Unstable canonicalisation

Ouverte
#84 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
36/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
python
Domaine
testing

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

____________ 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}]}}
Langage dominant
Python
Étoiles
281
Forks
35
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de python-jsonschema/hypothesis-jsonschema

Toutes les issues de python-jsonschema/hypothesis-jsonschema

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.