Skip to content

Actually decorate this test.#160

Merged
arokem merged 1 commit into
tractometry:mainfrom
arokem:decorate_test
Jan 21, 2026
Merged

Actually decorate this test.#160
arokem merged 1 commit into
tractometry:mainfrom
arokem:decorate_test

Conversation

@arokem

@arokem arokem commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fixes a silly mistake in my previous effort here.

Copilot AI review requested due to automatic review settings January 21, 2026 20:58
@arokem
arokem merged commit 151294a into tractometry:main Jan 21, 2026

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 fixes a mistake where a pytest decorator was not properly applied to a test function. The decorator line was missing the @ symbol, which prevented it from actually decorating the test function.

Changes:

  • Added the @ symbol to convert a standalone statement into a proper pytest decorator for the test_viz_name_errors() function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AFQ/tests/test_viz.py
pytest.mark.skip(not Viz, "Skipping viz tests, unable to import viz utils")


@pytest.mark.skip(not Viz, "Skipping viz tests, unable to import viz utils")

Copilot AI Jan 21, 2026

Copy link

Choose a reason for hiding this comment

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

The decorator should use pytest.mark.skipif instead of pytest.mark.skip when conditionally skipping based on a condition. The correct syntax is @pytest.mark.skipif(not Viz, reason="Skipping viz tests, unable to import viz utils"). The pytest.mark.skip decorator is used for unconditionally skipping tests and doesn't accept a condition parameter.

Suggested change
@pytest.mark.skip(not Viz, "Skipping viz tests, unable to import viz utils")
@pytest.mark.skipif(not Viz, reason="Skipping viz tests, unable to import viz utils")

Copilot uses AI. Check for mistakes.
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.

2 participants