Changed location of test HTML files
parent
3b5b2b1522
commit
ee483a7f91
@ -1,18 +1,23 @@
|
||||
from os import path
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division, print_function, unicode_literals
|
||||
|
||||
TEST_DIR = path.dirname(__file__)
|
||||
from os.path import abspath, dirname, join
|
||||
|
||||
|
||||
def load_snippet(filename):
|
||||
"""Helper to fetch in the content of a test snippet"""
|
||||
file_path = path.join(TEST_DIR, 'test_snippets', filename)
|
||||
TEST_DIR = abspath(dirname(__file__))
|
||||
|
||||
|
||||
def load_snippet(file_name):
|
||||
"""Helper to fetch in the content of a test snippet."""
|
||||
file_path = join(TEST_DIR, "data/snippets", file_name)
|
||||
with open(file_path) as file:
|
||||
return file.read()
|
||||
|
||||
|
||||
def load_article(filename):
|
||||
"""Helper to fetch in the content of a test article"""
|
||||
file_path = path.join(TEST_DIR, 'test_articles', filename)
|
||||
def load_article(file_name):
|
||||
"""Helper to fetch in the content of a test article."""
|
||||
file_path = join(TEST_DIR, "data/articles", file_name)
|
||||
with open(file_path) as file:
|
||||
return file.read()
|
||||
|
Loading…
Reference in New Issue