Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* Suppress pytest assertion rewrite warning for basilisp when running `basilisp test` (#1252)

## [v0.4.0]
### Added
* Added support for referring imported Python names as by `from ... import ...` (#1154)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ prompt-toolkit = ">=3.0.0,<4.0.0"
pyrsistent = ">=0.18.0,<1.0.0"
typing-extensions = ">=4.7.0,<5.0.0"

pytest = { version = ">=7.0.0,<9.0.0", optional = true }
pytest = { version = ">=8.4.0,<9.0.0", optional = true }
pygments = { version = ">=2.9.0,<3.0.0", optional = true }

[tool.poetry.group.dev.dependencies]
black = ">=24.0.0"
docutils = "*"
isort = "*"
pygments = "*"
pytest = ">=7.0.0,<9.0.0"
pytest = ">=8.4.0,<9.0.0"
pytest-pycharm = "*"
# Ensure the Sphinx version remains synchronized with docs/requirements.txt
# to maintain consistent output during both development and publishing on
Expand Down
9 changes: 9 additions & 0 deletions src/basilisp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,15 @@ def test(
"Cannot run tests without dependency PyTest. Please install PyTest and try again.",
)
else:
# `basilisp` declares the testrunner as a pytest plugin, so
# pytest tries to import it for assertion rewriting. Since
# it's already imported, pytest emits a warning. As rewriting
# isn't needed, we ignore it.
extra = [
"-W",
"ignore:Module already imported so cannot be rewritten; basilisp:pytest.PytestAssertRewriteWarning",
] + extra

sys.exit(pytest.main(args=list(extra)))


Expand Down
Loading