summaryrefslogtreecommitdiffstats
path: root/tests/test_rst_compiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_rst_compiler.py')
-rw-r--r--tests/test_rst_compiler.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_rst_compiler.py b/tests/test_rst_compiler.py
index c5db8dd..ae4ac06 100644
--- a/tests/test_rst_compiler.py
+++ b/tests/test_rst_compiler.py
@@ -27,13 +27,18 @@ always unquoted.
from __future__ import unicode_literals, absolute_import
+# This code is so you can run the samples without installing the package,
+# and should be before any import touching nikola, in any file under tests/
+import os
+import sys
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
+
+
import codecs
try:
from io import StringIO
except ImportError:
from StringIO import StringIO # NOQA
-import os
-import sys
import tempfile
import docutils
@@ -113,6 +118,7 @@ class FakeSite(object):
FakePost(title='Fake post',
slug='fake-post')
]
+ self.debug = True
def render_template(self, name, _, context):
return('<img src="IMG.jpg">')