Created
April 22, 2014 15:52
-
-
Save aodag/11184454 to your computer and use it in GitHub Desktop.
テストケースをもっと明示的にできないかと考えた書き方。こんなデコレータはまだ存在しない。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from testfixtures import compare | |
from inspirated import testcase_config, test_config | |
@testcase_config(target='your.product.Foo') | |
class TestFoo(object): | |
@test_config(params=[({'var': 1}, 4)]) | |
def test_it(self, target, var, expected): | |
foo = target() | |
result = foo.some_method(var) | |
compare(result, expected) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment