Title: Broken tests for py3.{9..11} · Issue #153 · frescobaldi/python-ly · GitHub
Open Graph Title: Broken tests for py3.{9..11} · Issue #153 · frescobaldi/python-ly
X Title: Broken tests for py3.{9..11} · Issue #153 · frescobaldi/python-ly
Description: Test suit generealy does not work in latest version with following output (Only for the first test, the rest is pretty the same): python3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_output_style=count -p no:cov -p no:flake8 ...
Open Graph Description: Test suit generealy does not work in latest version with following output (Only for the first test, the rest is pretty the same): python3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_ou...
X Description: Test suit generealy does not work in latest version with following output (Only for the first test, the rest is pretty the same): python3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_ou...
Opengraph URL: https://github.com/frescobaldi/python-ly/issues/153
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Broken tests for py3.{9..11}","articleBody":"Test suit generealy does not work in latest version with following output (Only for the first test, the rest is pretty the same):\r\n```\r\npython3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:tavern\r\n================================================= test session starts =================================================\r\nplatform linux -- Python 3.11.1, pytest-7.2.1, pluggy-1.0.0 -- /var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7-python3_11/install/usr/bin/python3.11\r\ncachedir: .pytest_cache\r\nrootdir: /var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7\r\ncollecting ... collected 16 items\r\n\r\ntests/test_xml.py::test_glissando FAILED [ 1/16]\r\ntests/test_xml.py::test_tie FAILED [ 2/16]\r\ntests/test_xml.py::test_merge_voice FAILED [ 3/16]\r\ntests/test_xml.py::test_variable FAILED [ 4/16]\r\ntests/test_xml.py::test_dynamics FAILED [ 5/16]\r\ntests/test_xml.py::test_tuplet FAILED [ 6/16]\r\ntests/test_xml.py::test_merge_voice_slurs FAILED [ 7/16]\r\ntests/test_xml.py::test_break FAILED [ 8/16]\r\ntests/test_xml.py::test_mark FAILED [ 9/16]\r\ntests/test_xml.py::test_partial FAILED [10/16]\r\ntests/test_xml.py::test_full_bar FAILED [11/16]\r\ntests/test_xml.py::test_stem_direction FAILED [12/16]\r\ntests/test_xml.py::test_church FAILED [13/16]\r\ntests/test_xml.py::test_markup FAILED [14/16]\r\ntests/test_xml.py::test_breathe FAILED [15/16]\r\ntests/test_xml.py::test_no_barcheck FAILED [16/16]\r\n\r\n====================================================== FAILURES =======================================================\r\n___________________________________________________ test_glissando ____________________________________________________\r\n\r\n def test_glissando():\r\n> compare_output('glissando')\r\n\r\n\r\ntests/test_xml.py:11: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\ntests/test_xml.py:97: in compare_output\r\n output = ly_to_xml(filebase + '.ly')\r\n filebase = '/var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7/tests/test_xml_files/glissando'\r\n filename = 'glissando'\r\ntests/test_xml.py:79: in ly_to_xml\r\n xml.write(sio, \"utf-8\")\r\n filename = '/var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7/tests/test_xml_files/glissando.ly'\r\n lyfile = \u003c_io.TextIOWrapper name='/var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7/tests/test_xml_files/glissando.ly' mode='r' encoding='UTF-8'>\r\n sio = \u003c_io.StringIO object at 0x7fa31554f760>\r\n writer = \u003cly.musicxml.lymus2musxml.ParseSource object at 0x7fa315551410>\r\n xml = \u003cly.musicxml.create_musicxml.MusicXML object at 0x7fa314dd5f10>\r\nly/musicxml/create_musicxml.py:703: in write\r\n write(file)\r\n doctype = True\r\n encoding = 'utf-8'\r\n file = \u003c_io.StringIO object at 0x7fa31554f760>\r\n self = \u003cly.musicxml.create_musicxml.MusicXML object at 0x7fa314dd5f10>\r\n write = \u003cfunction MusicXML.write.\u003clocals>.write at 0x7fa314f30680>\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nf = \u003c_io.StringIO object at 0x7fa31554f760>\r\n\r\n def write(f):\r\n if doctype:\r\n> f.write((xml_decl_txt + \"\\n\").format(encoding=encoding).encode(encoding))\r\nE TypeError: string argument expected, got 'bytes'\r\n\r\ndoctype = True\r\nencoding = 'utf-8'\r\nf = \u003c_io.StringIO object at 0x7fa31554f760>\r\nself = \u003cly.musicxml.create_musicxml.MusicXML object at 0x7fa314dd5f10>\r\n\r\nly/musicxml/create_musicxml.py:697: TypeError\r\n\r\n...\r\n\r\nFAILED tests/test_xml.py::test_glissando - TypeError: string argument expected, got 'bytes'\r\n```\r\nThis is because `StringIO.getvalue()` returs string. I changed it to `BytesIO` with following patch:\r\n```diff\r\nindex 33ddfbb..38a8a45 100644\r\n--- a/tests/test_xml.py\r\n+++ b/tests/test_xml.py\r\n@@ -75,9 +75,9 @@ def ly_to_xml(filename):\r\n with open(filename, 'r') as lyfile:\r\n writer.parse_text(lyfile.read())\r\n xml = writer.musicxml()\r\n- sio = io.StringIO()\r\n- xml.write(sio, \"utf-8\")\r\n- return sio.getvalue()\r\n+ bio = io.BytesIO()\r\n+ xml.write(bio, \"UTF-8\")\r\n+ return bio.getvalue().decode(\"utf-8\")\r\n \r\n \r\n def read_expected_xml(filename):\r\n-- \r\n2.39.2\r\n```\r\nbut tests fail with following errors:\r\n```\r\npython3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:tavern\r\n================================================= test session starts =================================================\r\nplatform linux -- Python 3.11.1, pytest-7.2.1, pluggy-1.0.0 -- /var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7-python3_11/install/usr/bin/python3.11\r\ncachedir: .pytest_cache\r\nrootdir: /var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7\r\ncollecting ... collected 16 items\r\n\r\ntests/test_xml.py::test_glissando FAILED [ 1/16]\r\ntests/test_xml.py::test_tie FAILED [ 2/16]\r\ntests/test_xml.py::test_merge_voice FAILED [ 3/16]\r\ntests/test_xml.py::test_variable FAILED [ 4/16]\r\ntests/test_xml.py::test_dynamics FAILED [ 5/16]\r\ntests/test_xml.py::test_tuplet FAILED [ 6/16]\r\ntests/test_xml.py::test_merge_voice_slurs FAILED [ 7/16]\r\ntests/test_xml.py::test_break FAILED [ 8/16]\r\ntests/test_xml.py::test_mark FAILED [ 9/16]\r\ntests/test_xml.py::test_partial FAILED [10/16]\r\ntests/test_xml.py::test_full_bar FAILED [11/16]\r\ntests/test_xml.py::test_stem_direction FAILED [12/16]\r\ntests/test_xml.py::test_church FAILED [13/16]\r\ntests/test_xml.py::test_markup FAILED [14/16]\r\ntests/test_xml.py::test_breathe FAILED [15/16]\r\ntests/test_xml.py::test_no_barcheck FAILED [16/16]\r\n\r\n====================================================== FAILURES =======================================================\r\n___________________________________________________ test_glissando ____________________________________________________\r\n\r\n def test_glissando():\r\n> compare_output('glissando')\r\n\r\n\r\ntests/test_xml.py:11: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\ntests/test_xml.py:100: in compare_output\r\n assert_multi_line_equal(expected_output, output)\r\n expected_output = ('\u003c?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'\r\n '\u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 '\r\n 'Partwise//EN\"\\n'\r\n ' '\r\n '\"http://www.musicxml.org/dtds/partwise.dtd\">\\n'\r\n '\u003cscore-partwise version=\"3.0\">\\n'\r\n ' \u003cidentification>\\n'\r\n ' \u003cencoding>\\n'\r\n ' \u003csoftware>python-ly 0.9.4\u003c/software>\\n'\r\n ' \u003cencoding-date>2023-02-21\u003c/encoding-date>\\n'\r\n ' \u003c/encoding>\\n'\r\n ' \u003c/identification>\\n'\r\n ' \u003cpart-list>\\n'\r\n ' \u003cscore-part id=\"P1\">\\n'\r\n ' \u003cpart-name />\\n'\r\n ' \u003c/score-part>\\n'\r\n ' \u003c/part-list>\\n'\r\n ' \u003cpart id=\"P1\">\\n'\r\n ' \u003cmeasure number=\"1\">\\n'\r\n ' \u003cattributes>\\n'\r\n ' \u003cdivisions>1\u003c/divisions>\\n'\r\n ' \u003ctime symbol=\"common\">\\n'\r\n ' \u003cbeats>4\u003c/beats>\\n'\r\n ' \u003cbeat-type>4\u003c/beat-type>\\n'\r\n ' \u003c/time>\\n'\r\n ' \u003cclef>\\n'\r\n ' \u003csign>G\u003c/sign>\\n'\r\n ' \u003cline>2\u003c/line>\\n'\r\n ' \u003c/clef>\\n'\r\n ' \u003c/attributes>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>C\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"start\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>E\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"stop\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003c/measure>\\n'\r\n ' \u003c/part>\\n'\r\n '\u003c/score-partwise>\\n')\r\n filebase = '/var/tmp/portage/dev-python/python-ly-0.9.7/work/python-ly-0.9.7/tests/test_xml_files/glissando'\r\n filename = 'glissando'\r\n output = ('\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\r\n '\u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 '\r\n 'Partwise//EN\"\\n'\r\n ' '\r\n '\"http://www.musicxml.org/dtds/partwise.dtd\">\\n'\r\n '\u003cscore-partwise version=\"3.0\">\\n'\r\n ' \u003cidentification>\\n'\r\n ' \u003cencoding>\\n'\r\n ' \u003csoftware>python-ly 0.9.7\u003c/software>\\n'\r\n ' \u003cencoding-date>2023-02-21\u003c/encoding-date>\\n'\r\n ' \u003c/encoding>\\n'\r\n ' \u003c/identification>\\n'\r\n ' \u003cpart-list>\\n'\r\n ' \u003cscore-part id=\"P1\">\\n'\r\n ' \u003cpart-name />\\n'\r\n ' \u003c/score-part>\\n'\r\n ' \u003c/part-list>\\n'\r\n ' \u003cpart id=\"P1\">\\n'\r\n ' \u003cmeasure number=\"1\">\\n'\r\n ' \u003cattributes>\\n'\r\n ' \u003cdivisions>1\u003c/divisions>\\n'\r\n ' \u003ctime symbol=\"common\">\\n'\r\n ' \u003cbeats>4\u003c/beats>\\n'\r\n ' \u003cbeat-type>4\u003c/beat-type>\\n'\r\n ' \u003c/time>\\n'\r\n ' \u003cclef>\\n'\r\n ' \u003csign>G\u003c/sign>\\n'\r\n ' \u003cline>2\u003c/line>\\n'\r\n ' \u003c/clef>\\n'\r\n ' \u003c/attributes>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>C\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"start\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>E\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"stop\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003c/measure>\\n'\r\n ' \u003c/part>\\n'\r\n '\u003c/score-partwise>\\n')\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nfirst = '\u003c?xml version=\"1.0\" encoding=\"utf-8\"?>\\n\u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 Partwise//EN\"...\"solid\" number=\"1\" type=\"stop\" />\\n \u003c/notations>\\n \u003c/note>\\n \u003c/measure>\\n \u003c/part>\\n\u003c/score-partwise>\\n'\r\nsecond = '\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 Partwise//EN\"...\"solid\" number=\"1\" type=\"stop\" />\\n \u003c/notations>\\n \u003c/note>\\n \u003c/measure>\\n \u003c/part>\\n\u003c/score-partwise>\\n'\r\nmsg = None\r\n\r\n def assert_multi_line_equal(first, second, msg=None):\r\n \"\"\"Assert that two multi-line strings are equal.\r\n \r\n If they aren't, show a nice diff.\r\n \"\"\"\r\n assert isinstance(first, str), 'First argument is not a string'\r\n assert isinstance(second, str), 'Second argument is not a string'\r\n \r\n if first != second:\r\n message = ''.join(difflib.ndiff(first.splitlines(True),\r\n second.splitlines(True)))\r\n if msg:\r\n message += \" : \" + msg\r\n> assert False, \"Multi-line strings are unequal:\\n\" + message\r\nE AssertionError: Multi-line strings are unequal:\r\nE - \u003c?xml version=\"1.0\" encoding=\"utf-8\"?>\r\nE ? ^^^\r\nE + \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\nE ? ^^^\r\nE \u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 Partwise//EN\"\r\nE \"http://www.musicxml.org/dtds/partwise.dtd\">\r\nE \u003cscore-partwise version=\"3.0\">\r\nE \u003cidentification>\r\nE \u003cencoding>\r\nE - \u003csoftware>python-ly 0.9.4\u003c/software>\r\nE ? ^\r\nE + \u003csoftware>python-ly 0.9.7\u003c/software>\r\nE ? ^\r\nE \u003cencoding-date>2023-02-21\u003c/encoding-date>\r\nE \u003c/encoding>\r\nE \u003c/identification>\r\nE \u003cpart-list>\r\nE \u003cscore-part id=\"P1\">\r\nE \u003cpart-name />\r\nE \u003c/score-part>\r\nE \u003c/part-list>\r\nE \u003cpart id=\"P1\">\r\nE \u003cmeasure number=\"1\">\r\nE \u003cattributes>\r\nE \u003cdivisions>1\u003c/divisions>\r\nE \u003ctime symbol=\"common\">\r\nE \u003cbeats>4\u003c/beats>\r\nE \u003cbeat-type>4\u003c/beat-type>\r\nE \u003c/time>\r\nE \u003cclef>\r\nE \u003csign>G\u003c/sign>\r\nE \u003cline>2\u003c/line>\r\nE \u003c/clef>\r\nE \u003c/attributes>\r\nE \u003cnote>\r\nE \u003cpitch>\r\nE \u003cstep>C\u003c/step>\r\nE \u003coctave>3\u003c/octave>\r\nE \u003c/pitch>\r\nE \u003cduration>1\u003c/duration>\r\nE \u003cvoice>1\u003c/voice>\r\nE \u003ctype>quarter\u003c/type>\r\nE \u003cnotations>\r\nE \u003cglissando line-type=\"solid\" number=\"1\" type=\"start\" />\r\nE \u003c/notations>\r\nE \u003c/note>\r\nE \u003cnote>\r\nE \u003cpitch>\r\nE \u003cstep>E\u003c/step>\r\nE \u003coctave>3\u003c/octave>\r\nE \u003c/pitch>\r\nE \u003cduration>1\u003c/duration>\r\nE \u003cvoice>1\u003c/voice>\r\nE \u003ctype>quarter\u003c/type>\r\nE \u003cnotations>\r\nE \u003cglissando line-type=\"solid\" number=\"1\" type=\"stop\" />\r\nE \u003c/notations>\r\nE \u003c/note>\r\nE \u003c/measure>\r\nE \u003c/part>\r\nE \u003c/score-partwise>\r\nE \r\nE assert False\r\n\r\nfirst = ('\u003c?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'\r\n '\u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 '\r\n 'Partwise//EN\"\\n'\r\n ' '\r\n '\"http://www.musicxml.org/dtds/partwise.dtd\">\\n'\r\n '\u003cscore-partwise version=\"3.0\">\\n'\r\n ' \u003cidentification>\\n'\r\n ' \u003cencoding>\\n'\r\n ' \u003csoftware>python-ly 0.9.4\u003c/software>\\n'\r\n ' \u003cencoding-date>2023-02-21\u003c/encoding-date>\\n'\r\n ' \u003c/encoding>\\n'\r\n ' \u003c/identification>\\n'\r\n ' \u003cpart-list>\\n'\r\n ' \u003cscore-part id=\"P1\">\\n'\r\n ' \u003cpart-name />\\n'\r\n ' \u003c/score-part>\\n'\r\n ' \u003c/part-list>\\n'\r\n ' \u003cpart id=\"P1\">\\n'\r\n ' \u003cmeasure number=\"1\">\\n'\r\n ' \u003cattributes>\\n'\r\n ' \u003cdivisions>1\u003c/divisions>\\n'\r\n ' \u003ctime symbol=\"common\">\\n'\r\n ' \u003cbeats>4\u003c/beats>\\n'\r\n ' \u003cbeat-type>4\u003c/beat-type>\\n'\r\n ' \u003c/time>\\n'\r\n ' \u003cclef>\\n'\r\n ' \u003csign>G\u003c/sign>\\n'\r\n ' \u003cline>2\u003c/line>\\n'\r\n ' \u003c/clef>\\n'\r\n ' \u003c/attributes>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>C\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"start\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>E\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"stop\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003c/measure>\\n'\r\n ' \u003c/part>\\n'\r\n '\u003c/score-partwise>\\n')\r\nmessage = ('- \u003c?xml version=\"1.0\" encoding=\"utf-8\"?>\\n'\r\n '? ^^^\\n'\r\n '+ \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\r\n '? ^^^\\n'\r\n ' \u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 '\r\n 'Partwise//EN\"\\n'\r\n ' '\r\n '\"http://www.musicxml.org/dtds/partwise.dtd\">\\n'\r\n ' \u003cscore-partwise version=\"3.0\">\\n'\r\n ' \u003cidentification>\\n'\r\n ' \u003cencoding>\\n'\r\n '- \u003csoftware>python-ly 0.9.4\u003c/software>\\n'\r\n '? ^\\n'\r\n '+ \u003csoftware>python-ly 0.9.7\u003c/software>\\n'\r\n '? ^\\n'\r\n ' \u003cencoding-date>2023-02-21\u003c/encoding-date>\\n'\r\n ' \u003c/encoding>\\n'\r\n ' \u003c/identification>\\n'\r\n ' \u003cpart-list>\\n'\r\n ' \u003cscore-part id=\"P1\">\\n'\r\n ' \u003cpart-name />\\n'\r\n ' \u003c/score-part>\\n'\r\n ' \u003c/part-list>\\n'\r\n ' \u003cpart id=\"P1\">\\n'\r\n ' \u003cmeasure number=\"1\">\\n'\r\n ' \u003cattributes>\\n'\r\n ' \u003cdivisions>1\u003c/divisions>\\n'\r\n ' \u003ctime symbol=\"common\">\\n'\r\n ' \u003cbeats>4\u003c/beats>\\n'\r\n ' \u003cbeat-type>4\u003c/beat-type>\\n'\r\n ' \u003c/time>\\n'\r\n ' \u003cclef>\\n'\r\n ' \u003csign>G\u003c/sign>\\n'\r\n ' \u003cline>2\u003c/line>\\n'\r\n ' \u003c/clef>\\n'\r\n ' \u003c/attributes>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>C\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"start\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>E\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"stop\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003c/measure>\\n'\r\n ' \u003c/part>\\n'\r\n ' \u003c/score-partwise>\\n')\r\nmsg = None\r\nsecond = ('\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n'\r\n '\u003c!DOCTYPE score-partwise PUBLIC \"-//Recordare//DTD MusicXML 2.0 '\r\n 'Partwise//EN\"\\n'\r\n ' '\r\n '\"http://www.musicxml.org/dtds/partwise.dtd\">\\n'\r\n '\u003cscore-partwise version=\"3.0\">\\n'\r\n ' \u003cidentification>\\n'\r\n ' \u003cencoding>\\n'\r\n ' \u003csoftware>python-ly 0.9.7\u003c/software>\\n'\r\n ' \u003cencoding-date>2023-02-21\u003c/encoding-date>\\n'\r\n ' \u003c/encoding>\\n'\r\n ' \u003c/identification>\\n'\r\n ' \u003cpart-list>\\n'\r\n ' \u003cscore-part id=\"P1\">\\n'\r\n ' \u003cpart-name />\\n'\r\n ' \u003c/score-part>\\n'\r\n ' \u003c/part-list>\\n'\r\n ' \u003cpart id=\"P1\">\\n'\r\n ' \u003cmeasure number=\"1\">\\n'\r\n ' \u003cattributes>\\n'\r\n ' \u003cdivisions>1\u003c/divisions>\\n'\r\n ' \u003ctime symbol=\"common\">\\n'\r\n ' \u003cbeats>4\u003c/beats>\\n'\r\n ' \u003cbeat-type>4\u003c/beat-type>\\n'\r\n ' \u003c/time>\\n'\r\n ' \u003cclef>\\n'\r\n ' \u003csign>G\u003c/sign>\\n'\r\n ' \u003cline>2\u003c/line>\\n'\r\n ' \u003c/clef>\\n'\r\n ' \u003c/attributes>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>C\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"start\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003cnote>\\n'\r\n ' \u003cpitch>\\n'\r\n ' \u003cstep>E\u003c/step>\\n'\r\n ' \u003coctave>3\u003c/octave>\\n'\r\n ' \u003c/pitch>\\n'\r\n ' \u003cduration>1\u003c/duration>\\n'\r\n ' \u003cvoice>1\u003c/voice>\\n'\r\n ' \u003ctype>quarter\u003c/type>\\n'\r\n ' \u003cnotations>\\n'\r\n ' \u003cglissando line-type=\"solid\" number=\"1\" type=\"stop\" />\\n'\r\n ' \u003c/notations>\\n'\r\n ' \u003c/note>\\n'\r\n ' \u003c/measure>\\n'\r\n ' \u003c/part>\\n'\r\n '\u003c/score-partwise>\\n')\r\n\r\ntests/test_xml.py:129: AssertionError\r\n\r\n...\r\n\r\n=============================================== short test summary info ===============================================\r\nFAILED tests/test_xml.py::test_glissando - AssertionError: Multi-line strings are unequal:\r\n```\r\nI have tried to fix this with some substitutions simalar to how date is handled but I failed to make it work. Here are my latest substitutions I have made in case anyone will try to fix it:\r\n```diff\r\ndiff --git a/tests/test_xml.py b/tests/test_xml.py\r\nindex 38a8a45..1b9b740 100644\r\n--- a/tests/test_xml.py\r\n+++ b/tests/test_xml.py\r\n@@ -2,9 +2,11 @@\r\n import datetime\r\n import difflib\r\n import ly.musicxml\r\n+import ly.pkginfo\r\n from lxml import etree\r\n import os\r\n import io\r\n+import re\r\n \r\n \r\n def test_glissando():\r\n@@ -85,7 +87,9 @@ def read_expected_xml(filename):\r\n with open(filename, 'r') as xmlfile:\r\n output = xmlfile.read()\r\n # Replace date in XML file with today's date\r\n- output = output.replace(\"2016-03-28\", str(datetime.date.today()))\r\n+ output = output.replace(\"utf-8\", \"UTF-8\")\r\n+ output = re.sub(\"python-ly \\d.\\d.\\d\", ly.pkginfo.name + \" \" + ly.pkginfo.version, output)\r\n+ output = re.sub(r'201\\d-\\d{2}-\\d{2}', str(datetime.date.today()), output)\r\n return output\r\n \r\n \r\n-- \r\n```","author":{"url":"https://github.com/arkamar","@type":"Person","name":"arkamar"},"datePublished":"2023-02-21T13:43:33Z","url":"https://github.com/frescobaldi/python-ly/issues/153"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:783ed59f-61a9-c0f5-ef6a-2fe3f8dc38e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D790:2DEF1C:383542:46ADEC:6B09C271 |
| html-safe-nonce | 1680a306b57ab1acc915d2a48d5a8d3c5298d6f22c3e09c2ab86d4bd5fe52186 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzkwOjJERUYxQzozODM1NDI6NDZBREVDOjZCMDlDMjcxIiwidmlzaXRvcl9pZCI6IjI1OTEyOTI4NDY4MDg2MTM0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c0ffe0ecc7e3ad3b4925e287e052edd9f8dcaaac45044208c47230170460f3c9 |
| hovercard-subject-tag | issue:1593509274 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/frescobaldi/python-ly/153/issue_layout |
| twitter:image | https://opengraph.githubassets.com/954c9a631f0468567d4fbcf4d8c975289ee8034e2f8fef1358c64e507d7a32f6/frescobaldi/python-ly/issues/153 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/954c9a631f0468567d4fbcf4d8c975289ee8034e2f8fef1358c64e507d7a32f6/frescobaldi/python-ly/issues/153 |
| og:image:alt | Test suit generealy does not work in latest version with following output (Only for the first test, the rest is pretty the same): python3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_ou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arkamar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29e6866c4c5b6697a062df08d37fa80bbfb75810ca4280c0d277f04956012d39 |
| turbo-cache-control | no-preview |
| go-import | github.com/frescobaldi/python-ly git https://github.com/frescobaldi/python-ly.git |
| octolytics-dimension-user_id | 19853952 |
| octolytics-dimension-user_login | frescobaldi |
| octolytics-dimension-repository_id | 29728425 |
| octolytics-dimension-repository_nwo | frescobaldi/python-ly |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29728425 |
| octolytics-dimension-repository_network_root_nwo | frescobaldi/python-ly |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e72aac8801621433bb0313888fbbe243f5998abc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width