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

deepdiff 7.0.1 test failure in Fedora rawhide with Python 3.13 #474

Open
susilehtola opened this issue Jul 30, 2024 · 1 comment
Open

deepdiff 7.0.1 test failure in Fedora rawhide with Python 3.13 #474

susilehtola opened this issue Jul 30, 2024 · 1 comment

Comments

@susilehtola
Copy link

Describe the bug
Tests fail in Fedora rawhide

=================================== FAILURES ===================================
_ TestCommands.test_diff_command[t1_corrupt.json-t2.json-Expecting property name enclosed in double quotes-1] _
self = <tests.test_command.TestCommands object at 0x3ff2342f750>
t1 = '/builddir/build/BUILD/python-deepdiff-7.0.1-build/deepdiff-7.0.1/tests/fixtures/t1_corrupt.json'
t2 = '/builddir/build/BUILD/python-deepdiff-7.0.1-build/deepdiff-7.0.1/tests/fixtures/t2.json'
expected_in_stdout = 'Expecting property name enclosed in double quotes'
expected_exit_code = 1
    @pytest.mark.parametrize('t1, t2, expected_in_stdout, expected_exit_code', [
        ('t1.json', 't2.json', '"dictionary_item_added": [\n    "root[0]', 0),
        ('t1_corrupt.json', 't2.json', "Expecting property name enclosed in double quotes", 1),
        ('t1.json', 't2_json.csv', '"old_value": "value2"', 0),
        ('t2_json.csv', 't1.json', '"old_value": "value3"', 0),
        ('t1.csv', 't2.csv', '"new_value": "James"', 0),
        ('t1.toml', 't2.toml', "10.0.0.2", 0),
        ('t1.pickle', 't2.pickle', '"new_value": 5,\n      "old_value": 1', 0),
        ('t1.yaml', 't2.yaml', '"new_value": 61,\n      "old_value": 65', 0),
    ])
    def test_diff_command(self, t1, t2, expected_in_stdout, expected_exit_code):
        t1 = os.path.join(FIXTURES_DIR, t1)
        t2 = os.path.join(FIXTURES_DIR, t2)
        runner = CliRunner()
        result = runner.invoke(diff, [t1, t2])
        assert result.exit_code == expected_exit_code
>       assert expected_in_stdout in result.output
E       AssertionError: assert 'Expecting property name enclosed in double quotes' in 'Error when loading t1: Illegal trailing comma before end of object: line 3 column 21 (char 45)\n'
E        +  where 'Error when loading t1: Illegal trailing comma before end of object: line 3 column 21 (char 45)\n' = <Result SystemExit('Error when loading t1: Illegal trailing comma before end of object: line 3 column 21 (char 45)')>.output
tests/test_command.py:29: AssertionError
=============================== warnings summary ===============================
tests/test_serialization.py:341
  /builddir/build/BUILD/python-deepdiff-7.0.1-build/deepdiff-7.0.1/tests/test_serialization.py:341: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    (7, datetime.datetime.utcnow(), datetime.datetime.fromisoformat),
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_command.py::TestCommands::test_diff_command[t1_corrupt.json-t2.json-Expecting property name enclosed in double quotes-1]
============= 1 failed, 904 passed, 10 skipped, 1 warning in 3.07s =============

OS, DeepDiff version and Python version (please complete the following information):
deepdiff 7.0.1 on Fedora rawhide

DEBUG util.py:463:   python3-dateutil          noarch 1:2.8.2-16.fc41  build      879.2 KiB
DEBUG util.py:463:   python3-devel             s390x  3.13.0~b4-2.fc41 build        1.8 MiB
DEBUG util.py:463:   python3-jsonpickle        noarch 3.2.2-2.fc41     build      298.4 KiB
DEBUG util.py:463:   python3-numpy             s390x  1:1.26.4-8.fc41  build       41.8 MiB
DEBUG util.py:463:   python3-pydantic          noarch 2.8.2-2.fc41     build        4.3 MiB
DEBUG util.py:463:   python3-pytest            noarch 7.4.3-6.fc41     build        3.6 MiB
DEBUG util.py:463:   python3-tomli-w           noarch 1.0.0-14.fc41    build       28.3 KiB

Full root log
Full build log

@seperman
Copy link
Owner

Hi @susilehtola
We don't currently test on Fedora. Looking quickly on github, it seems like we may be able to add it to the Github actions test matrix:

jobs:
  fedora-job:
    runs-on: ubuntu-latest
    container: fedora:35
    steps:
      - run: cat /etc/os-release

PRs are very welcome!

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

No branches or pull requests

2 participants