Skip to content

Commit

Permalink
fixing tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
juarezr committed Oct 7, 2020
1 parent 6caf274 commit 22585ea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions petl/test/io/test_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,15 @@ def test_fromxml_entity():


def _check_toxml(table, expected, check=(), **kwargs):
with NamedTemporaryFile(delete=True, mode='wt') as f:
with NamedTemporaryFile(delete=True, suffix='.xml') as f:
filename = f.name
toxml(table, filename, **kwargs)
try:
actual = fromxml(filename, *check)
_compare(expected, actual)
except Exception as ex:
print('XML:', open(filename).read(), file=sys.stderr)
raise ex
toxml(table, filename, **kwargs)
try:
actual = fromxml(filename, *check)
_compare(expected, actual)
except Exception as ex:
print('XML:', open(filename).read(), file=sys.stderr)
raise ex


_HEAD1 = (('foo', 'bar'),)
Expand Down

0 comments on commit 22585ea

Please sign in to comment.