pytest-marks

Software screenshot:
pytest-marks
Dettagli del software:
Versione: 0.3
Data di caricamento: 15 Apr 15
Sviluppatore: Adam Goucher
Licenza: Libero
Popolarità: 4

Rating: 4.0/5 (Total Votes: 1)

La possibilità di impostare "marchi" sui metodi di prova py.test è piuttosto fresco.
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.red
& Nbsp; & nbsp; & nbsp; def some_test_method (self):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; # Roba check-y
Ma se avete una mezza dozzina di segni che si desidera mettere su un metodo, diventa un pò schifo.
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.red
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.green
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.blue
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.black
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.orange
& Nbsp; & nbsp; & nbsp; @ Pytest.mark.pink
& Nbsp; & nbsp; & nbsp; def some_test_method (self):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; # Roba check-y
Quanto sarebbe bello è che se tutti si potrebbe applicare in un singolo decoratore.
& Nbsp; & nbsp; & nbsp; @ Pytest.marks ('rosso', 'verde', 'blu', 'nero', 'orange', 'rosa')
& Nbsp; & nbsp; & nbsp; def some_test_method (self):
& Nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; # Roba check-y
Bene, ora è possibile, con il modulo pytest-segni

Requisiti :.

  • Python

Programmi simili

Altri software di sviluppo Adam Goucher

py.saunter
py.saunter

20 Feb 15

Commenti a pytest-marks

I commenti non trovato
Aggiungi commento
Accendere le immagini!