Closed PatrikKopkan closed 1 year ago
AoT (array of tables) should compare correctly to list (it is a list subclass). The problem seems more subtle than it appears.
Looks like an upstream bug.
Is this still an issue with the current version of https://pypi.org/project/tomlkit ?
Given the CI does not fail now (running against tomlkit 0.11.4) I’m assuming this is fixed.
In tomlkit 0.5.3 the test compares two lists. In 0.5.5 compares list and aot object
tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_pipfile_load0') def test_pipfile_load(tmpdir): fi = tmpdir.join("Pipfile.in") fi.write(textwrap.dedent(""" [packages] flask = { version = "*" } jinja2 = '*' # A comment. """)) p = Pipfile.load(fi) > assert p["source"] == SourceCollection([ { 'url': 'https://pypi.org/simple', 'verify_ssl': True, 'name': 'pypi', }, ]) E AssertionError: assert SourceCollect...ssl': True}]>) == SourceCollecti...me': 'pypi'}]) E -SourceCollection(