Skip to content

Conversation

mgorny
Copy link

@mgorny mgorny commented Nov 1, 2024

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.

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.
@coveralls
Copy link

coveralls commented Nov 1, 2024

Pull Request Test Coverage Report for Build 11629589471

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.007%) to 60.149%

Files with Coverage Reduction New Missed Lines %
owslib/iso3.py 1 79.04%
Totals Coverage Status
Change from base Build 11539793229: -0.007%
Covered Lines: 8561
Relevant Lines: 14233

💛 - Coveralls

@geographika geographika merged commit a8ade74 into geographika:offline Nov 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants