matchmaker

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

Rating: nan/5 (Total Votes: 0)

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

jstestnetlib
jstestnetlib

20 Feb 15

nose-setenv
nose-setenv

14 Apr 15

Linux Test Project
Linux Test Project

12 May 15

Commenti a matchmaker

I commenti non trovato
Aggiungi commento
Accendere le immagini!