def test_runner_sets_executing_test_method_as_context():
class SomeTestCase(unittest.TestCase):
def test_foo(self):
assert 'test name' in ctx.data, ctx.data.keys()
tests = ctx.data['test name']
assert len(tests) == 1
assert [str(self)] == tests
with override_current_context() as ctx:
run_testcases_with_django_runner(SomeTestCase, nr_of_tests=1)
test_integrates_with_django_testrunner.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录