ligolw_sqlite_test fails on python3.7
The ligolw_sqlite_test
test fails on python3.7 as follows:
$ make -C test ligolw_sqlite_test
=== start ligolw_sqlite_test ===>
sh ligolw_sqlite_test.sh && { echo "Pass" ; true ; } || { echo "Fail" ; false ; }
ligolw_sqlite test 1: detect missing input
--------------------------------------------------------------------
removed 'ligolw_sqlite_test.sqlite'
'ligolw_sqlite_test.sqlite': no such file
ligolw_sqlite test 1: success
ligolw_sqlite detected missing input and did not create an empty database
ligolw_sqlite test 2: merge .xml.gz files and compare to ligolw_add
--------------------------------------------------------------------
removed 'ligolw_sqlite_test_ref.xml'
removed 'ligolw_sqlite_test_output.xml'
1/2:reading 'ligolw_sqlite_test_input.xml.gz' ...
2/2:reading 'ligolw_sqlite_test_input.xml.gz' ...
reassigning row IDs▐███████████████████████████████████████████████████████████████████▌100.0%
merging elements ...
writing 'ligolw_sqlite_test_ref.xml' ...
1/2: reading 'file:///Users/duncan/git/python-ligo-lw-fork/test/ligolw_sqlite_test_input.xml.gz' ...
updating IDs: 100%
2/2: reading 'ligolw_sqlite_test_input.xml.gz' ...
updating IDs: 100%
indexing process_params table ...
indexing search_summary table ...
indexing coinc_event table ...
indexing coinc_event_map table ...
indexing coinc_definer table ...
writing 'ligolw_sqlite_test_output.xml' ...
done.
ligolw_sqlite_test_ref.xml ligolw_sqlite_test_output.xml differ: char 184, line 5
Fail
make: *** [ligolw_sqlite_test] Error 1
The fundamental problem is that the column tags are written differently:
$ head test/ligolw_sqlite_test_ref.xml test/ligolw_sqlite_test_output.xml
==> test/ligolw_sqlite_test_ref.xml <==
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE LIGO_LW SYSTEM "http://ldas-sw.ligo.caltech.edu/doc/ligolwAPI/html/ligolw_dtd.txt">
<LIGO_LW>
<Table Name="process:table">
<Column Type="lstring" Name="program"/>
<Column Type="lstring" Name="version"/>
<Column Type="lstring" Name="cvs_repository"/>
<Column Type="int_4s" Name="cvs_entry_time"/>
<Column Type="lstring" Name="comment"/>
<Column Type="int_4s" Name="is_online"/>
==> test/ligolw_sqlite_test_output.xml <==
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE LIGO_LW SYSTEM "http://ldas-sw.ligo.caltech.edu/doc/ligolwAPI/html/ligolw_dtd.txt">
<LIGO_LW>
<Table Name="process:table">
<Column Name="program" Type="lstring"/>
<Column Name="version" Type="lstring"/>
<Column Name="cvs_repository" Type="lstring"/>
<Column Name="cvs_entry_time" Type="int_4s"/>
<Column Name="comment" Type="lstring"/>
<Column Name="is_online" Type="int_4s"/>
which is presumably something to do with dict
key ordering. The same failure occurs on python3.6, but not on python2.7.