Unstable canonicalisation

Offen
#84 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
36/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
testing

Rechercherichtung

Start with tests/test_canonicalise.py, where the failing property test checks whether canonicalisation reaches an equivalent fixpoint. Use the falsifying schema in the report to investigate why repeated canonicalisation changes the result, then run that test to verify the fixpoint holds. The issue is nearly five and a half years old with no recent comment, so it may need maintainer confirmation before work begins.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

____________ test_canonicalises_to_equivalent_fixpoint[any-schema] _____________
[gw0] linux -- Python 3.7.10 /home/runner/work/hypothesis-jsonschema/hypothesis-jsonschema/.tox/test/bin/python
tests/test_canonicalise.py:27: in test_canonicalises_to_equivalent_fixpoint
    @given(data=st.data())
tests/test_canonicalise.py:33: in test_canonicalises_to_equivalent_fixpoint
    assert cc == canonicalish(cc)
E   AssertionError: assert {'not': {'min...g', 'object']} == {'type': ['nu...g', 'object']}
E     Omitting 1 identical items, use -vv to show
E     Left contains 1 more item:
E     {'not': {'minItems': 1, 'type': 'array'}}
E     Use -v to get the full diff
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_canonicalises_to_equivalent_fixpoint(
    data=data(...), schema_strategy=_json_schemata(),
)
Draw 1 (schema): {'not': {'anyOf': [{'type': 'array', 'items': {}, 'contains': {}}, {'type': 'array', 'items': True}]}}
Vorherrschende Sprache
Python
Sterne
281
Forks
35
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus python-jsonschema/hypothesis-jsonschema

Alle Issues in python-jsonschema/hypothesis-jsonschema

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.