Commit 40cfa45
Add offline testing to CI (#952)
* Setup offline testing in CI
* Remove option
* 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.
---------
Co-authored-by: Michał Górny <[email protected]>1 parent cdd92cd commit 40cfa45
File tree
5 files changed
+276
-262
lines changed- .github/workflows
- tests
5 files changed
+276
-262
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments