Tests fail on python 3.8
scarabeusiv opened this issue · comments
Tomáš Chvátal commented
As the python now sorts stuff by default there are now two tests failingn if one runs them on python 3.8:
[ 53s] ======================================================================
[ 53s] FAIL: test_writing_1_record (test.writer.XMLWriterTest)
[ 53s] ----------------------------------------------------------------------
[ 53s] Traceback (most recent call last):
[ 53s] File "/home/abuild/rpmbuild/BUILD/pymarc-3.1.13/test/writer.py", line 517, in test_writing_1_record
[ 53s] self.assertEquals(file_handle.getvalue(), expected)
[ 53s] AssertionError: b'<?x[141 chars]ield tag="100" ind1="0" ind2="0"><subfield cod[171 chars]ion>' != b'<?x[141 chars]ield ind1="0" ind2="0" tag="100"><subfield cod[171 chars]ion>'
[ 53s]
[ 53s] ======================================================================
[ 53s] FAIL: test_writing_3_records (test.writer.XMLWriterTest)
[ 53s] ----------------------------------------------------------------------
[ 53s] Traceback (most recent call last):
[ 53s] File "/home/abuild/rpmbuild/BUILD/pymarc-3.1.13/test/writer.py", line 591, in test_writing_3_records
[ 53s] self.assertEquals(file_handle.getvalue(), expected)
[ 53s] AssertionError: b'<?x[220 chars]ield tag="100" ind1="0" ind2="0"><subfield cod[614 chars]ion>' != b'<?x[220 chars]ield ind1="0" ind2="0" tag="100"><subfield cod[614 chars]ion>'
[ 53s]
[ 53s] ----------------------------------------------------------------------
[ 53s] Ran 122 tests in 0.284s
The content seems the same, it just oredrs stuff differently so the assertion is no longer True.