File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414### Removed
1515 * Removed support for Python 3.9 (#1283 )
1616
17+ * Suppress pytest assertion rewrite warning for basilisp when running ` basilisp test ` (#1252 )
18+
1719## [ v0.4.0]
1820### Added
1921 * Added support for referring imported Python names as by ` from ... import ... ` (#1154 )
Original file line number Diff line number Diff line change @@ -745,6 +745,15 @@ def test(
745745 "Cannot run tests without dependency PyTest. Please install PyTest and try again." ,
746746 )
747747 else :
748+ # `basilisp` declares the testrunner as a pytest plugin, so
749+ # pytest tries to import it for assertion rewriting. Since
750+ # it's already imported, pytest emits a warning. As rewriting
751+ # isn't needed, we ignore it.
752+ extra = [
753+ "-W" ,
754+ "ignore:Module already imported so cannot be rewritten:pytest.PytestAssertRewriteWarning" ,
755+ ] + extra
756+
748757 sys .exit (pytest .main (args = list (extra )))
749758
750759
You can’t perform that action at this time.
0 commit comments