Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

test: Mark network as 'network', hence slow - #76

Merged
pierrepo merged 5 commits into
mainfrom
add-tests-in-ci
Jan 27, 2026
Merged

pierrepo merged 5 commits into
mainfrom
add-tests-in-ci

Conversation

@pierrepo

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.network to network-dependent tests in tests/core/test_network.py.
  • Added a pytest configuration file defining the network marker 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.

Comment thread tests/core/test_network.py Outdated

@pytest.mark.network
def test_get_html_page_with_selenium_good_url():
"""Test the get_html_page_with_selenium function with a bad URL."""

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"""Test the get_html_page_with_selenium function with a bad URL."""
"""Test the get_html_page_with_selenium function with a good URL."""

Copilot uses AI. Check for mistakes.
Comment thread pytest.toml
Comment on lines +1 to +2
[pytest]
addopts = ["--strict-markers"]

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
[pytest]
addopts = ["--strict-markers"]
[tool.pytest.ini_options]
addopts = "--strict-markers"

Copilot uses AI. Check for mistakes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/ci.yml Outdated
- name: Install python dependencies
run: uv sync --locked --dev

- name: Run pre-commit hooks

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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").

Suggested change
- name: Run pre-commit hooks
- name: Run tests

Copilot uses AI. Check for mistakes.
@pierrepo
pierrepo merged commit 6465782 into main Jan 27, 2026
2 checks passed
@pierrepo
pierrepo deleted the add-tests-in-ci branch January 27, 2026 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants