Skip to content

Use pytest.raises() instead of ad-hoc assert_raises_regexp() context manager#1302

Merged
mvdbeek merged 2 commits intogalaxyproject:masterfrom
nsoranzo:drop_assert_raises_regexp
Oct 28, 2022
Merged

Use pytest.raises() instead of ad-hoc assert_raises_regexp() context manager#1302
mvdbeek merged 2 commits intogalaxyproject:masterfrom
nsoranzo:drop_assert_raises_regexp

Conversation

@nsoranzo
Copy link
Member

Fix ModuleNotFoundError: No module named 'py.code'; 'py' is not a package when importing from tests/test_utils.py .

Also add type annotations to training material tests.

The `assert_raises_regexp()` context manager required the deprecated
`py` library, which is no more a dependency of `pytest` since v7.2.0 .
@nsoranzo nsoranzo added the bug label Oct 28, 2022
Copy link
Member

@martenson martenson left a comment

Choose a reason for hiding this comment

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

much cleaner, thanks @nsoranzo

@mvdbeek mvdbeek enabled auto-merge October 28, 2022 16:39
@mvdbeek mvdbeek merged commit dbd1ece into galaxyproject:master Oct 28, 2022
@nsoranzo nsoranzo deleted the drop_assert_raises_regexp branch October 28, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants