Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self-tests fail against tomlkit 0.11.6 #59

Closed
stanislavlevin opened this issue Oct 27, 2022 · 2 comments · Fixed by #60
Closed

self-tests fail against tomlkit 0.11.6 #59

stanislavlevin opened this issue Oct 27, 2022 · 2 comments · Fixed by #60

Comments

@stanislavlevin
Copy link

With recent tomlkit 0.11.6 ini2toml tests fail:

...
__________________________________ test_data_files ___________________________________

translator = <ini2toml.translator.Translator object at 0x7fcdedea8e80>

    def test_data_files(translator):
        # Same thing but with the higher level API:
        with pytest.warns(DeprecationWarning, match="'data-files' is deprecated"):
            text = translator.translate(example_data_files, profile_name="setup.cfg")
>           assert text.strip() == expected_data_files.strip()
E           assert '[build-system]\nrequires = ["setuptools>=61.2"]\nbuild-backend = "setuptools.build_meta"\n\n[project]\ndynamic = ["version"]\n\n[tool.setuptools]\ndata-files = {a = ["b"]}\ninclude-package-data = false' == '[build-system]\nrequires = ["setuptools>=61.2"]\nbuild-backend = "setuptools.build_meta"\n\n[project]\ndynamic = ["version"]\n\n[tool]\n[tool.setuptools]\ndata-files = {a = ["b"]}\ninclude-package-data = false'
E               [build-system]
E               requires = ["setuptools>=61.2"]
E               build-backend = "setuptools.build_meta"
E               
E               [project]
E               dynamic = ["version"]
E               
E             - [tool]
E               [tool.setuptools]
E               data-files = {a = ["b"]}
E               include-package-data = false

tests/plugins/test_setuptools_pep621.py:659: AssertionError
...
============================== short test summary info ===============================
FAILED tests/drivers/test_full_toml.py::test_convert - assert '[section1]\n# comment\nvalue = 42 # int value\n\n[section2]\nfloat-value ...
FAILED tests/plugins/test_setuptools_pep621.py::test_split_subtables - assert '[tool.setuptools.packages.find]\nwhere = "src"\n\n[project]\n[project.ent...
FAILED tests/plugins/test_setuptools_pep621.py::test_entrypoints_and_split_subtables - assert '[tool.setuptools.packages.find]\nwhere = "src"\n\n[project]\n[project.ent...
FAILED tests/plugins/test_setuptools_pep621.py::test_empty - assert '[build-system]\nrequires = ["setuptools>=61.2"]\nbuild-backend = "setupto...
FAILED tests/plugins/test_setuptools_pep621.py::test_data_files - assert '[build-system]\nrequires = ["setuptools>=61.2"]\nbuild-backend = "setupto...
============================ 5 failed, 81 passed in 5.75s ============================

With python-poetry/tomlkit#246 default value for is_super_table was changed from False to autodetect.

@abravalheri
Copy link
Owner

Thank you very much @stanislavlevin.

In #60, I am changing the test suite to work for both versions of tomlkit.

@stanislavlevin
Copy link
Author

Thank you for the fix :) it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants