diff --git a/.gitignore b/.gitignore index 44d96dcc..5ba5101e 100755 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,3 @@ htmlcov/ # rst2html README.html - -# generated pickle -*.pkl diff --git a/makefile b/makefile index 1dcca716..da2f8042 100644 --- a/makefile +++ b/makefile @@ -98,14 +98,12 @@ init: pip install -r requirements.txt pip install -r tests/requirements.txt -pytest: $(testNative) tests/tables.pkl tests/test_idempotent.native +pytest: $(testNative) tests/test_idempotent.native python3 -m pytest -vv --cov=pantable tests pytest2: $(testNative) tests/tables.pkl tests/test_idempotent.native python2 -m pytest -vv --cov=pantable tests pytestLite: python3 -m pytest -vv --cov=pantable tests -%.pkl: %.md - pandoc -F tests/to_pkl.py $< > /dev/null tests/reference_idempotent.native: tests/test_pantable.md pandoc --normalize -t native -F pantable/pantable.py -F pantable/pantable2csv.py -F pantable/pantable.py -F pantable/pantable2csv.py -o $@ $< tests/test_idempotent.native: tests/reference_idempotent.native diff --git a/tests/pantable2csv/test_table2csv.py b/tests/pantable2csv/test_table2csv.py index 1df9b452..88ba5047 100755 --- a/tests/pantable2csv/test_table2csv.py +++ b/tests/pantable2csv/test_table2csv.py @@ -8,10 +8,14 @@ def test_table2csv(): # get_table_body - with open('tests/grid_tables.pkl', 'rb') as file: - doc = pickle.load(file) - elem = doc.content[0] - code_block = table2csv(elem, {}) + markdown = """| 1 | 2 | 3 | 4 | +|:--|--:|:-:|---| +| 1 | 2 | 3 | 4 | + +: *abcd* +""" + Panflute = convert_text(markdown) + code_block = table2csv(*Panflute, {}) assert str(code_block) == '''CodeBlock(--- alignment: LRCD caption: '*abcd*'