Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[self-tests] several failures against toml-test 1.1.0

Aperta
#172 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Inizia da tests/test_toml_tests.py e dalla versione del sottocmodulo toml-test menzionata nel report. Esegui la suite con toml-test 1.1.0 ed esamina i quattro errori di invalid_decode che coinvolgono dotted keys e carriage returns. Il lavoro è completato quando il problema di compatibilità è risolto e l’intera self-test suite passa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've updated toml-test for my distro (1.1.0).
after that tomlkit's tests suite fails with:

=================================== FAILURES ===================================
_____________ test_invalid_decode[table/append-with-dotted-keys-2] _____________

invalid_decode_case = {'toml': '# This is the same issue as in injection-1.toml, except that nests one level\n# deeper. See that file for a ...= 9\n\n[a]\n  b.c.d.k.t = "Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed"\n'}

    def test_invalid_decode(invalid_decode_case):
>       with pytest.raises(TOMLKitError):
E       Failed: DID NOT RAISE <class 'tomlkit.exceptions.TOMLKitError'>

tests/test_toml_tests.py:55: Failed
_____________ test_invalid_decode[table/append-with-dotted-keys-1] _____________

invalid_decode_case = {'toml': '# First a.b.c defines a table: a.b.c = {z=9}\n#\n# Then we define a.b.c.t = "str" to add a str to the above ...\n  z = 9\n\n[a]\n  b.c.t = "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed"\n'}

    def test_invalid_decode(invalid_decode_case):
>       with pytest.raises(TOMLKitError):
E       Failed: DID NOT RAISE <class 'tomlkit.exceptions.TOMLKitError'>

tests/test_toml_tests.py:55: Failed
___________________ test_invalid_decode[control/comment-cr] ____________________

invalid_decode_case = {'toml': 'comment-cr = "Carriage return in comment" # \na=1\n'}

    def test_invalid_decode(invalid_decode_case):
>       with pytest.raises(TOMLKitError):
E       Failed: DID NOT RAISE <class 'tomlkit.exceptions.TOMLKitError'>

tests/test_toml_tests.py:55: Failed
_____________________ test_invalid_decode[control/bare-cr] _____________________

invalid_decode_case = {'toml': '# The following line contains a single carriage return control character\n\n'}

    def test_invalid_decode(invalid_decode_case):
>       with pytest.raises(TOMLKitError):
E       Failed: DID NOT RAISE <class 'tomlkit.exceptions.TOMLKitError'>

tests/test_toml_tests.py:55: Failed
=========================== short test summary info ============================
FAILED tests/test_toml_tests.py::test_invalid_decode[table/append-with-dotted-keys-2]
FAILED tests/test_toml_tests.py::test_invalid_decode[table/append-with-dotted-keys-1]
FAILED tests/test_toml_tests.py::test_invalid_decode[control/comment-cr] - Fa...
FAILED tests/test_toml_tests.py::test_invalid_decode[control/bare-cr] - Faile...
======================== 4 failed, 800 passed in 9.35s =========================

tomlkit 0.9.0.

I understand that this project submodules toml-test (1.0.0 atm).

Lingua principale
Python
Stelle
850
Fork
163
Merge medio
13m
PR unite (30g)
2

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-poetry/tomlkit

Tutte le issue di python-poetry/tomlkit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.