Skip to content

Commit e4f8ed5

Browse files
Fixed test cases for pandoc 3x (#324)
1 parent d97d48a commit e4f8ed5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ def test_get_pandoc_version(self):
157157
version = pypandoc.get_pandoc_version()
158158
self.assertTrue(isinstance(version, pypandoc.string_types))
159159
major = int(version.split(".")[0])
160-
# according to http://pandoc.org/releases.html there were only two versions 0.x ...
161-
self.assertTrue(major in [0, 1, 2])
160+
self.assertTrue(major in [0, 1, 2, 3])
162161

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

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

0 commit comments

Comments
 (0)