Пример #1
0
 def test_result_callable_accepts_kwargs(self, tmpdir):
     result = LocalResult(dir=tmpdir, location=lambda **kwargs: kwargs["key"])
     assert result.location is None
     new_result = result.format(key="42")
     assert new_result.location.endswith("42")
Пример #2
0
 def test_result_accepts_callable_for_location(self, tmpdir):
     result = LocalResult(dir=tmpdir, location=lambda **kwargs: "special_val")
     assert result.location is None
     new_result = result.format()
     assert new_result.location.endswith("special_val")