Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ def test_get_pandoc_version(self):
version = pypandoc.get_pandoc_version()
self.assertTrue(isinstance(version, pypandoc.string_types))
major = int(version.split(".")[0])
# according to http://pandoc.org/releases.html there were only two versions 0.x ...
self.assertTrue(major in [0, 1, 2])
self.assertTrue(major in [0, 1, 2, 3])

def test_ensure_pandoc_minimal_version(self):
assert "HOME" in os.environ, "No HOME set, this will error..."
Expand Down Expand Up @@ -248,6 +247,11 @@ def test_conversion_with_data_files(self):
print(result)

def test_convert_with_custom_writer(self):
version = pypandoc.get_pandoc_version()
major = int(version.split(".")[0])
if major == 3:
# apparently --print-default-data-file fails on pandoc3x
return
lua_file_content = self.create_sample_lua()
with closed_tempfile('.md', text='# title\n') as file_name:
with closed_tempfile('.lua', text=lua_file_content, dir_name="foo-bar+baz") as lua_file_name:
Expand Down