Skip to content

Commit

Permalink
improve unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
irinaschubert committed Oct 27, 2021
1 parent bd31b55 commit fc7a061
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 52 deletions.
6 changes: 3 additions & 3 deletions test/test_id_to_iri.py
Expand Up @@ -11,7 +11,7 @@ def test_invalid_xml_file_name(self):
with self.assertRaises(SystemExit) as cm:
id_to_iri(xml_file='test.xml',
json_file='../testdata/test-id2iri-mapping.json',
out_file='_test-id2iri-replaced.xml',
out_file='../testdata/tmp/_test-id2iri-replaced.xml',
verbose=True)

self.assertEqual(cm.exception.code, 1)
Expand All @@ -20,13 +20,13 @@ def test_invalid_json_file_name(self):
with self.assertRaises(SystemExit) as cm:
id_to_iri(xml_file='../testdata/test-id2iri-data.xml',
json_file='test.json',
out_file='_test-id2iri-replaced.xml',
out_file='../testdata/tmp/_test-id2iri-replaced.xml',
verbose=True)

self.assertEqual(cm.exception.code, 1)

def test_replace_id_with_iri(self):
out_file = '_test-id2iri-replaced.xml'
out_file = '../testdata/tmp/_test-id2iri-replaced.xml'
id_to_iri(xml_file='../testdata/test-id2iri-data.xml',
json_file='../testdata/test-id2iri-mapping.json',
out_file=out_file,
Expand Down
2 changes: 1 addition & 1 deletion testdata/BUILD.bazel
Expand Up @@ -18,7 +18,7 @@ filegroup(
"test-id2iri-data.xml",
"test-id2iri-mapping.json",
"test-id2iri-replaced.xml",
"broken-xml.xml"
"tmp/_test-id2iri-replaced.xml"
],
)

48 changes: 0 additions & 48 deletions testdata/broken-xml.xml

This file was deleted.

File renamed without changes.

0 comments on commit fc7a061

Please sign in to comment.