私はSpockと協力して、 'where'節を愛用しています。複数の入出力でテストケースを簡単に実行できます。例:Python用のSpockライクなテストライブラリがあります
class HelloSpock extends spock.lang.Specification {
def "length of Spock's and his friends' names"() {
expect:
name.size() == length
where:
name | length
"Spock" | 5
"Kirk" | 4
"Scotty" | 6
}
}
Pythonには何か類似点はありますか?
以下の回答は役に立ちましたか? –