Skip to content

4.3.0: pytest is failing in jsonschema/tests/test_cli.py::TestParser::test_find_validator_by_fully_qualified_object_name unit #895

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

Closed
kloczek opened this issue Dec 17, 2021 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Dec 17, 2021

I'm trying to package your module as an rpm package. So I'm using the typical build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build --no-isolation -w
  • install .whl file in </install/prefix>
  • "pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Looks like pytest if failing in jsonschema/tests/test_cli.py::TestParser::test_find_validator_by_fully_qualified_object_name unit:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --import-mode=importlib
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=1364540989
rootdir: /home/tkloczko/rpmbuild/BUILD/jsonschema-4.3.0
plugins: mock-3.6.1, cov-2.12.1, anyio-3.3.4, flaky-3.7.0, console-scripts-1.2.0, asyncio-0.16.0, freezegun-0.4.2, flake8-1.0.7, rerunfailures-9.1.1, yagot-0.5.0, forked-1.4.0, ordering-0.6, xdist-2.5.0, Faker-10.0.0, benchmark-3.4.1, pyfakefs-4.5.3, datadir-1.3.1, regressions-2.2.0, timeout-2.0.2, randomly-3.10.3, perf-0.10.1
collected 6805 items

jsonschema/tests/test_validators.py ................................................................................................................................ [  1%]
............................................................s.s...........................................s...........s.....                                         [  3%]
jsonschema/tests/test_jsonschema_test_suite.py .s...............s......s...............s......s..s..............s.....s......s....s................................. [  5%]
.....s..............ss........................................s............s......................s..................s.........s.............................s...... [  7%]
......s..s.................ss.s......s...................s................s......s..........................................s......s............s..................s [ 10%]
................s...............s.........s..s..............s.............................................s...........s.........s...s..........................s.... [ 12%]
...................s...........................................s.......s........s.....................s.......s.s...s..s.s...........s.............................. [ 15%]
...........s.............................s............s..s...........s............s.....s..........................s.s........s..............s.......s.s.........s.. [ 17%]
......s..........s...........s...........ss.............s.s..............s........s..........s.......................s........................ss............s....... [ 19%]
...................s...s.......................ss...........s....s....s..s..........s............s...................s..............s.........ss.................... [ 22%]
.s....s..s........s..........................s....................s.s.........................................................s....s...s...............s........s.s. [ 24%]
.s..................s..........s......................s.......s........s......s...s.....................s...........s....s...........s......s.s....s..s............. [ 27%]
....................s.........................................................s................s...s.................s..........................s...........s.s..... [ 29%]
........s.........s.....................................s..........................s......ss..s...................................................s..s...........s.s [ 31%]
..s..............s...............................s..............................s........s.s.................s................s......s....s....................s.... [ 34%]
...s.......................................s...........................s............................................................................................ [ 36%]
.........................s.ss............s.........................s......s.......................s................................................................. [ 39%]
s......s............................................................................................................................................................ [ 41%]
.s......................................s..............................s.....s...................................s.............................s.................... [ 43%]
...s.......................s....................................................s............................s...................................................... [ 46%]
...........s..................................................s......................s...................s..s.s.......s..s.......s..ss...s..sss.........s....ss.s.s. [ 48%]
.............s....s.....ss.......s.......s......s.sss..s...s......s.....s........ss.....s....s....s.s.s...........s.s.s...s...s.s..ss.....s........ss.....s..s.s..s. [ 51%]
..........ss.........ss..s.......s....s..s..s...ss..s..s.s..s...s........s....s.ss.....s..s............ss.............ss.s...s..................s.s..ss..s...s....s. [ 53%]
.ss........s.....s..ss.............s............ss.............................................................s.................s...............................s.. [ 56%]
.....................................s....s.............s...........................................s......s...................s...................s..s............. [ 58%]
....s..s...................................................s.........................................s.....................................................s........ [ 60%]
....s.........................s........................................s..............s..............s..s................s..s..............ss....................... [ 63%]
.........s.s...................................................s.................................................s....................s.s..........s................ [ 65%]
.........................................................s......s..............................s......s...........s..........s...................s......s........... [ 68%]
...s............................s.................................s......s..................................s.............s...s.............s.......s............... [ 70%]
s................................................................s................................s.................s....s.......................................s.. [ 72%]
.....................ss......s......................s..............s...s........s.................s..s..........s..s...s...................................s...s...s [ 75%]
......s....s..................s..............s..s....s...............................s.s...........s.....s.s....s...s......s................s...................s... [ 77%]
....s..............s..............................s.......s....s.........................s......s.......s...........s.....s.......................s....s...s..ss.... [ 80%]
.s.s...s...............s.s..s.........s..........s...s....s...............s........s.................s.......s.....................................................s [ 82%]
s....................................s...........................s.......................s.............s................................................s........... [ 84%]
.s....s.........s...........................................s.s.......................ss....s..........s...........................s........................s....s.. [ 87%]
.................s............................s.........s............................................................s.............................................. [ 89%]
...............s......ss..............s................................................s..............................ss.s................s.s....ss.s...ss......sss. [ 92%]
.s..........s.s....s.s..................s..s.s....ss....ss........s.ss..ss..s....s.....ss..........s....s.............s...........s......................s..s.....s. [ 94%]
.s.s......ss..s.......s....s.....s.s.s.s..ss......s......s..s..s..ss.......ss.......s....s.s....s....s..s..........ss......s..s.......s.....s..s..s.ss.ss.......s... [ 97%]
s......s.....s..s........s..ss..s..ss..s..s....s.s...ss..........s...                                                                                                [ 98%]
jsonschema/tests/test_cli.py ...F..............................................                                                                                      [ 98%]
jsonschema/tests/test_exceptions.py ...............................                                                                                                  [ 99%]
jsonschema/tests/test_utils.py .......................                                                                                                               [ 99%]
jsonschema/tests/test_types.py ..............                                                                                                                        [ 99%]
jsonschema/tests/test_deprecations.py .......                                                                                                                        [ 99%]
jsonschema/tests/test_format.py ..........                                                                                                                           [100%]

================================================================================= FAILURES =================================================================================
______________________________________________________ TestParser.test_find_validator_by_fully_qualified_object_name _______________________________________________________

self = <test_cli.TestParser testMethod=test_find_validator_by_fully_qualified_object_name>

    def test_find_validator_by_fully_qualified_object_name(self):
        arguments = cli.parse_args(
            [
                "--validator",
                "jsonschema.tests.test_cli.TestParser.FakeValidator",
                "--instance", "mem://some/instance",
                "mem://some/schema",
            ],
        )
>       self.assertIs(arguments["validator"], self.FakeValidator)
E       AssertionError: <class 'jsonschema.tests.test_cli.fake_validator.<locals>.FakeValidator'> is not <class 'test_cli.fake_validator.<locals>.FakeValidator'>

jsonschema/tests/test_cli.py:846: AssertionError
========================================================================= short test summary info ==========================================================================
SKIPPED [2] jsonschema/tests/test_validators.py:1648: A known bug. See issue #523.
SKIPPED [2] jsonschema/tests/test_validators.py:1655: A known bug. See issue #523.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: A known bug. See issue #371.
SKIPPED [45] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'hostname' not found.
SKIPPED [38] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'uri' not found.
SKIPPED [64] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'date-time' not found.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: A known bug. See issue #371.
SKIPPED [18] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Complex email validation is (intentionally) unsupported.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: A known bug.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: A known bug.
SKIPPED [28] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: Leap seconds are unsupported.
SKIPPED [5] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Rejecting leading zeros is 3.9+
SKIPPED [60] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'time' not found.
SKIPPED [12] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'iri' not found.
SKIPPED [48] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'json-pointer' not found.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'uri-reference' not found.
SKIPPED [15] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'relative-json-pointer' not found.
SKIPPED [4] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: A known bug. See issue #593.
SKIPPED [6] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'iri-reference' not found.
SKIPPED [4] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'uri-template' not found.
SKIPPED [3] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: These tests depends on dynamicRef working.
SKIPPED [28] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: dynamicRef support isn't working yet.
SKIPPED [35] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: dynamicRef support isn't working yet.
SKIPPED [3] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: These tests depends on dynamicRef working.
SKIPPED [18] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'duration' not found.
SKIPPED [9] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'host-name' not found.
SKIPPED [14] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: unevaluatedItems is different in 2019-09 (needs work).
SKIPPED [21] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: unevaluatedItems is different in 2019-09 (needs work).
FAILED jsonschema/tests/test_cli.py::TestParser::test_find_validator_by_fully_qualified_object_name - AssertionError: <class 'jsonschema.tests.test_cli.fake_validator.<l...
=============================================================== 1 failed, 6282 passed, 522 skipped in 24.40s ===============================================================
@kloczek
Copy link
Author

kloczek commented Dec 17, 2021

Looks like it is yest another issue .. pytest is failing in some random units when pytast-randomly is used bacaiuse there are some dependencies between units.
Example:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --import-mode=importlib
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=766777705
rootdir: /home/tkloczko/rpmbuild/BUILD/jsonschema-4.3.0
plugins: mock-3.6.1, cov-2.12.1, anyio-3.3.4, flaky-3.7.0, console-scripts-1.2.0, asyncio-0.16.0, freezegun-0.4.2, flake8-1.0.7, rerunfailures-9.1.1, yagot-0.5.0, forked-1.4.0, ordering-0.6, xdist-2.5.0, Faker-10.0.0, benchmark-3.4.1, pyfakefs-4.5.3, datadir-1.3.1, regressions-2.2.0, timeout-2.0.2, randomly-3.10.3, perf-0.10.1
collected 6805 items

jsonschema/tests/test_jsonschema_test_suite.py ..s............s................................................s.s..s........s.............................ss....... [  1%]
................................s..........................................................s.............................s.......................................... [  4%]
...............................s..s....................................s........................s........................................s......s............s...... [  6%]
........s........................s.....................s........................................s...................................................s............... [  8%]
s....s...............s................................s.............s........s......................................................s............ss..............s.. [ 11%]
.............s..............................s..........................s...................................................................s........................ [ 13%]
............................s.............................................s........................................s.........s..............s............s.......... [ 16%]
................................s...................................................s....................s...............................................s.......... [ 18%]
.............................................s.................................s.................................s.....s............................................ [ 20%]
..........s...........................................................s....s........................................................................................ [ 23%]
......s.....s.................s..s..s..ss.....s..s..ss.........s.s...s................s.ssss................ss.....s...........s...ssss....s.s......s.s..........s.. [ 25%]
....s...s...s.......s.s...ss............s...........s...ss...s.ss......s..s........ss....ss.s...sss.s...ss.............s.....ss..............s.s..s......ss.s....... [ 28%]
..ssss.s.....s...s..s.s.s...s...........ss..s...........s..sss........s.ss....s......ss...s...s.s..........s........s...........s................................... [ 30%]
...............s....................s...............s..s.........................s....s.s.........s.........s.........s........s................s................... [ 33%]
................s...s....................................s................................................................s.....s...........ss......s..............s [ 35%]
............s........s..s..............s......................................s............s.................s.........s....................s..................s.... [ 37%]
..s.......s.............................s.s.........................s....s...................................s...................................s........s......... [ 40%]
................s....................s...s...................s......s..ss.......................s..........s................s....................................... [ 42%]
.s....s..........s.....................................s.........................s.....................ss...........s...............s..........................s.s.. [ 45%]
....s............s...............s..........s.......s..........................................s.........s...s................................................s...s. [ 47%]
..s.............s.....s.............s.....s..........s................s.......s..................s.s.....s............ss...s............s........................... [ 49%]
........................s...................................................s..........................s.s.s...................s..........s...........s........s.... [ 52%]
..............s................s.....s...............s................s........................s..........s...................s..................................... [ 54%]
......s..........s...s...............s.s........s.......................ss..s...............s..........s.....s....s..............................s.................. [ 57%]
..................................s......s.......s.s.........................s...........................s..............ss.....s................................s... [ 59%]
.................s.s......s.s.s....s......s...s.s.....s..............s.s.......s.s........s...s..s....s..sss..............s..s.....s......s...s.........s......s.sss [ 61%]
s.ss...s.s..........ss.s...sss...s..........s..s.s...s.s..s..........s...s....ss.s....s...s.....s.s...sss.s.s...s.s....ss..........sssss...s........................ [ 64%]
.s...s.....s.s.s.......s.................ss..ss...s...s....s.ss....s.......s..s............s............s..ss....................................................s.. [ 66%]
.s........................s...........s.......s...............s........................................s.s..............s.................s..........s...........s.. [ 69%]
....s..........s.s..............s.....ss............ss..............................s...............................s..s............................................ [ 71%]
..............s............s............s.........................s.......................................s...s.............s......................s................ [ 74%]
s...s.........s.................................ss....s...........s....s..s..............s.............................s....s..s..............s.............s....... [ 76%]
................s............s...s.............s.................s..................s.........s..........s.......................................s.........s.......s [ 78%]
.s....................................s..s...s.................................s...............s...........s...................s...s.....s..s....s...s.............. [ 81%]
............s........s................s.......s...............................s............s...........s....s...............s.......s..................s...s........ [ 83%]
s...s....................s........s......s..............ss........................s.......s.................................s....s............................s..... [ 86%]
...........s...........s...................................................................s......s........ss...s..s..ss.....s..s.........s.ss....s.......s.......s. [ 88%]
....s.........s.ss.s.........s....s..s.................s.................s.............s....................s...s...s.......s.....s..s........s..................... [ 90%]
........................s..............s.s..........................................s..s..................s.s............s.ss.......s............................... [ 93%]
.............s............................s...............s..........                                                                                                [ 94%]
jsonschema/tests/test_validators.py ...............F...........F..............................................................................................s..... [ 96%]
......s...........................................................................................s..s......................                                         [ 98%]
jsonschema/tests/test_cli.py ...............................................F..                                                                                      [ 98%]
jsonschema/tests/test_types.py ..............                                                                                                                        [ 98%]
jsonschema/tests/test_exceptions.py ...............................                                                                                                  [ 99%]
jsonschema/tests/test_utils.py .......................                                                                                                               [ 99%]
jsonschema/tests/test_format.py ..........                                                                                                                           [ 99%]
jsonschema/tests/test_deprecations.py .......                                                                                                                        [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________ TestCreateAndExtend.test_validates_registers_meta_schema_draft6_id ____________________________________________________

self = <unittest.case._Outcome object at 0x7fa5a4528c70>, test_case = <test_validators.TestCreateAndExtend testMethod=test_validates_registers_meta_schema_draft6_id>
isTest = False

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, isTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

/usr/lib64/python3.8/unittest/case.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/case.py:717: in doCleanups
    self._callCleanup(function, *args, **kwargs)
/usr/lib64/python3.8/unittest/case.py:639: in _callCleanup
    function(*args, **kwargs)
/usr/lib64/python3.8/unittest/case.py:912: in assertEqual
    assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <test_validators.TestCreateAndExtend testMethod=test_validates_registers_meta_schema_draft6_id>
first = {'http://json-schema.org/draft-03/schema': <class 'jsonschema.validators.Draft3Validator'>, 'http://json-schema.org/dr...': <class 'jsonschema.validators.Draft202012Validator'>, 'meta schema id': <class 'jsonschema.validators.12Validator'>}
second = {'http://json-schema.org/draft-03/schema': <class 'jsonschema.validators.Draft3Validator'>, 'http://json-schema.org/dr...tors.Draft6Validator'>, 'http://json-schema.org/draft-07/schema': <class 'jsonschema.validators.Draft7Validator'>, ...}
msg = "{'htt[572 chars]hema id': <class 'jsonschema.validators.12Validator'>} != {'htt[572 chars]hema $id': <class 'jsonschema.validators.13Val[67 chars]or'>}"

    def _baseAssertEqual(self, first, second, msg=None):
        """The default assertEqual implementation, not type specific."""
        if not first == second:
            standardMsg = '%s != %s' % _common_shorten_repr(first, second)
            msg = self._formatMessage(msg, standardMsg)
>           raise self.failureException(msg)
E           AssertionError: {'htt[572 chars]hema id': <class 'jsonschema.validators.12Validator'>} != {'htt[572 chars]hema $id': <class 'jsonschema.validators.13Val[67 chars]or'>}

/usr/lib64/python3.8/unittest/case.py:905: AssertionError
_______________________________________________________ TestCreateAndExtend.test_validates_registers_meta_schema_id ________________________________________________________

self = <unittest.case._Outcome object at 0x7fa5a4399b80>, test_case = <test_validators.TestCreateAndExtend testMethod=test_validates_registers_meta_schema_id>
isTest = False

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, isTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

/usr/lib64/python3.8/unittest/case.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib64/python3.8/unittest/case.py:717: in doCleanups
    self._callCleanup(function, *args, **kwargs)
/usr/lib64/python3.8/unittest/case.py:639: in _callCleanup
    function(*args, **kwargs)
/usr/lib64/python3.8/unittest/case.py:912: in assertEqual
    assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <test_validators.TestCreateAndExtend testMethod=test_validates_registers_meta_schema_id>
first = {'http://json-schema.org/draft-03/schema': <class 'jsonschema.validators.Draft3Validator'>, 'http://json-schema.org/dr...01909Validator'>, 'https://json-schema.org/draft/2020-12/schema': <class 'jsonschema.validators.Draft202012Validator'>}
second = {'http://json-schema.org/draft-03/schema': <class 'jsonschema.validators.Draft3Validator'>, 'http://json-schema.org/dr...tors.Draft6Validator'>, 'http://json-schema.org/draft-07/schema': <class 'jsonschema.validators.Draft7Validator'>, ...}
msg = "{'htt[557 chars]tor'>} != {'htt[557 chars]tor'>, 'meta schema id': <class 'jsonschema.va[18 chars]or'>}"

    def _baseAssertEqual(self, first, second, msg=None):
        """The default assertEqual implementation, not type specific."""
        if not first == second:
            standardMsg = '%s != %s' % _common_shorten_repr(first, second)
            msg = self._formatMessage(msg, standardMsg)
>           raise self.failureException(msg)
E           AssertionError: {'htt[557 chars]tor'>} != {'htt[557 chars]tor'>, 'meta schema id': <class 'jsonschema.va[18 chars]or'>}

/usr/lib64/python3.8/unittest/case.py:905: AssertionError
______________________________________________________ TestParser.test_find_validator_by_fully_qualified_object_name _______________________________________________________

self = <test_cli.TestParser testMethod=test_find_validator_by_fully_qualified_object_name>

    def test_find_validator_by_fully_qualified_object_name(self):
        arguments = cli.parse_args(
            [
                "--validator",
                "jsonschema.tests.test_cli.TestParser.FakeValidator",
                "--instance", "mem://some/instance",
                "mem://some/schema",
            ],
        )
>       self.assertIs(arguments["validator"], self.FakeValidator)
E       AssertionError: <class 'jsonschema.tests.test_cli.fake_validator.<locals>.FakeValidator'> is not <class 'test_cli.fake_validator.<locals>.FakeValidator'>

jsonschema/tests/test_cli.py:846: AssertionError
========================================================================= short test summary info ==========================================================================
SKIPPED [18] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Complex email validation is (intentionally) unsupported.
SKIPPED [64] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'date-time' not found.
SKIPPED [9] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'host-name' not found.
SKIPPED [38] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'uri' not found.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: A known bug. See issue #371.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: A known bug. See issue #371.
SKIPPED [35] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: dynamicRef support isn't working yet.
SKIPPED [28] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: dynamicRef support isn't working yet.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: A known bug.
SKIPPED [3] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: These tests depends on dynamicRef working.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: A known bug.
SKIPPED [3] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: These tests depends on dynamicRef working.
SKIPPED [18] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'duration' not found.
SKIPPED [60] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'time' not found.
SKIPPED [45] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'hostname' not found.
SKIPPED [28] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: Leap seconds are unsupported.
SKIPPED [8] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'uri-reference' not found.
SKIPPED [15] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'relative-json-pointer' not found.
SKIPPED [12] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'iri' not found.
SKIPPED [48] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'json-pointer' not found.
SKIPPED [6] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'iri-reference' not found.
SKIPPED [5] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Rejecting leading zeros is 3.9+
SKIPPED [4] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: Format checker 'uri-template' not found.
SKIPPED [21] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:188: unevaluatedItems is different in 2019-09 (needs work).
SKIPPED [14] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: unevaluatedItems is different in 2019-09 (needs work).
SKIPPED [4] ../../BUILDROOT/python-jsonschema-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jsonschema/tests/_suite.py:191: A known bug. See issue #593.
SKIPPED [2] jsonschema/tests/test_validators.py:1655: A known bug. See issue #523.
SKIPPED [2] jsonschema/tests/test_validators.py:1648: A known bug. See issue #523.
FAILED jsonschema/tests/test_validators.py::TestCreateAndExtend::test_validates_registers_meta_schema_draft6_id - AssertionError: {'htt[572 chars]hema id': <class 'jsons...
FAILED jsonschema/tests/test_validators.py::TestCreateAndExtend::test_validates_registers_meta_schema_id - AssertionError: {'htt[557 chars]tor'>} != {'htt[557 chars]tor'...
FAILED jsonschema/tests/test_cli.py::TestParser::test_find_validator_by_fully_qualified_object_name - AssertionError: <class 'jsonschema.tests.test_cli.fake_validator.<l...
=============================================================== 3 failed, 6280 passed, 522 skipped in 24.50s ===============================================================

That kind of issues can be diagnosed using https://github.com/mrbean-bremen/pytest-find-dependencies/.
Temporary workaround: run pytest with -p no:randomly

@Julian Julian closed this as completed Dec 17, 2021
@python-jsonschema python-jsonschema locked as off-topic and limited conversation to collaborators Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants