Open jinty opened 7 years ago
Yep, reproduced this one with wget goo.gl/CDgb12 -O test_2145.py && pytest
.
I thought scope=session
fixtures were global, so this is expected?
On Mon, Dec 19, 2016 at 04:30:29PM -0800, Luke Murphy wrote:
Yep, reproduced this one with
wget goo.gl/CDgb12 -O test_2145.py && pytest
.I thought
scope=session
fixtures were global, so this is expected?
At least I don't expected that the result changes depending on test ordering and the dependency graph of the fixtures.
I would prefer an explicit error (i.e. "don't do that, it's silly") rather than the current behaviour which took quite a while to debug.
-- Brian Sutherland
the short story is, fixture declaration and mapping declarations to locations and caches is a complete mess and needs major refactoring ^^
While I agree with @RonnyPfannschmidt that the fixture system could use a refactoring to account for the features added in the last years, this warrants more investigation because I think there's a bug that should be solvable here; test_c
should not have been able to see the fixtures declared by TestSpecific
.
Best explained with a failing test, see:
https://github.com/jinty/pytest/commit/c0048b115314dd4a54d1fea5032d85f52efd221b
or inline for the lazy:
Fails with the current master.