matchmaker

Software screenshot:
matchmaker
Dettagli del software:
Versione: 0.1.3
Data di caricamento: 14 Apr 15
Sviluppatore: Carles Barrobes
Licenza: Libero
Popolarità: 33

Rating: 1.0/5 (Total Votes: 1)

matchmaker prevede decoratori che semplificano la creazione di matchers Hamcrest.
Da una funzione (con una docstring adeguato optional), creare hamcrest matchers con un minimo di codifica supplementare.
Le sorgenti possono essere trovati in GitHub.

Esempi:

da sensale import matcher
matcher
def is_even (voce):
& Nbsp; il ritorno dell'articolo 2% == 0
matcher
def ends_like (voce, dati, lunghezza = 3):
& Nbsp; "String cui ultimo {1} caratteri corrispondono a quelli per '{0}'"
& Nbsp; tornare item.endswith (dati [-Lunghezza:])
È quindi possibile utilizzare questi nei test come:
assert_that (numero, is_even ())
assert_that (word, ends_like (other_word, 4))
Gli errori vengono visualizzati come:
AssertionError:
Previsto: è ancora
& Nbsp; ma: era <3>
AssertionError:
Previsto: String cui 4 caratteri Ultima partita quelle per 'cello'
& Nbsp; ma: era 'hullo'

Requisiti :

  • Python

Programmi simili

LAMPcheck
LAMPcheck

2 Jun 15

Attest
Attest

14 Apr 15

JProfiler
JProfiler

17 Feb 15

Commenti a matchmaker

I commenti non trovato
Aggiungi commento
Accendere le immagini!