Repository navigation
test: Mark network as 'network', hence slow - #76
Conversation
There was a problem hiding this comment.
Pull request overview
This PR labels tests that perform real HTTP/Selenium calls as network tests and introduces pytest configuration intended to register the marker and enforce strict marker usage.
Changes:
- Added
@pytest.mark.networkto network-dependent tests intests/core/test_network.py. - Added a pytest configuration file defining the
networkmarker and enabling--strict-markers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/core/test_network.py | Marks external-network/Selenium tests with @pytest.mark.network so they can be selected/skipped separately. |
| pytest.toml | Attempts to register the network marker and enable strict marker enforcement via pytest config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| @pytest.mark.network | ||
| def test_get_html_page_with_selenium_good_url(): | ||
| """Test the get_html_page_with_selenium function with a bad URL.""" |
There was a problem hiding this comment.
The docstring says this is testing with a bad URL, but the test name is ...good_url and it uses a valid figshare URL. Please update the docstring to reflect that this is the “good URL”/success-path test to avoid confusion when reading failures.
| """Test the get_html_page_with_selenium function with a bad URL.""" | |
| """Test the get_html_page_with_selenium function with a good URL.""" |
| [pytest] | ||
| addopts = ["--strict-markers"] |
There was a problem hiding this comment.
pytest.toml is not a standard pytest auto-discovered config filename in many setups; since the repo doesn’t invoke pytest with -c pytest.toml, --strict-markers and the network marker registration may not be applied. To ensure this works consistently, move these settings into pyproject.toml under [tool.pytest.ini_options] (or use pytest.ini), and keep addopts in the format pytest expects for that config source (often a single string).
| [pytest] | |
| addopts = ["--strict-markers"] | |
| [tool.pytest.ini_options] | |
| addopts = "--strict-markers" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Install python dependencies | ||
| run: uv sync --locked --dev | ||
|
|
||
| - name: Run pre-commit hooks |
There was a problem hiding this comment.
The step name in the tests job is misleading: it says "Run pre-commit hooks" but the command is running pytest. Please rename the step to reflect what it actually does (e.g., "Run tests").
| - name: Run pre-commit hooks | |
| - name: Run tests |
No description provided.