ソースを参照

Little improvement on tests

The relative notebook import in `test_notebook.py` has been changed to
work in python 2&3. A note has been added to explain how to process
these tests.
Benjamin ABEL 10 年 前
コミット
0737bd5333
共有2 個のファイルを変更した10 個の追加1 個の削除を含む
  1. 9 0
      liquid_tags/Readme.md
  2. 1 1
      liquid_tags/test_notebook.py

+ 9 - 0
liquid_tags/Readme.md

@@ -152,4 +152,13 @@ comment line ``# <!-- collapse=False -->`` will be open on load but
 can be collapsed by clicking on their header. Cells without collapse
 can be collapsed by clicking on their header. Cells without collapse
 comments are rendered as standard code input cells.
 comments are rendered as standard code input cells.
 
 
+### Run unitests
+
+The file `test_notebook.py` contains tests that can be run using [nose](https://nose.readthedocs.org/en/latest/index.html)
+
+```
+cd path/to/liquid_tags
+nosetests
+```
+
 [<a name="1">1</a>] http://ipython.org/
 [<a name="1">1</a>] http://ipython.org/

+ 1 - 1
liquid_tags/test_notebook.py

@@ -2,7 +2,7 @@ import re
 
 
 from pelican.tests.support import unittest
 from pelican.tests.support import unittest
 
 
-import notebook
+from . import notebook
 
 
 
 
 class TestNotebookTagRegex(unittest.TestCase):
 class TestNotebookTagRegex(unittest.TestCase):