Skip to content

Commit 63d802f

Browse files
committed
Move network-accessing fixtures init into a pytest fixture
Move the OSHFixtures class into a pytest fixture to defer initializing it (and therefore accessing the Internet) until the relevant test functions are called. This makes it possible for `pytest.mark.online` to correctly skip them. It also avoids initializing the fixtures class multiple times -- now it should be initialized once per session. While at it, move the global functions into the OSHFixtures class. It would need to access the class members anyway, and this seems cleaner than passing its instance explicitly.
1 parent 170d511 commit 63d802f

File tree

1 file changed

+248
-261
lines changed

1 file changed

+248
-261
lines changed

0 commit comments

Comments
 (0)