Skip to content

Commit

Permalink
Propagate known pytest failure/skip reasons to pytest summary (#865)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Fisher <[email protected]>
  • Loading branch information
jhkennedy and mfisher87 authored Nov 6, 2024
1 parent daf6924 commit 50bf0b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ def typecheck(session: nox.Session) -> None:
def tests(session: nox.Session) -> None:
"""Run the unit tests."""
session.install("--editable", ".[test]")
session.run("pytest", "tests/unit", *session.posargs)
session.run(
"pytest",
"tests/unit",
"-rxXs", # Show provided reason in summary for (x)fail, (X)pass, and (s)kipped statuses
*session.posargs,
)


@nox.session(name="integration-tests")
Expand Down
2 changes: 1 addition & 1 deletion scripts/integration-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

set -x
pytest tests/integration --cov=earthaccess --cov-report=term-missing "${@}" --capture=no --tb=native --log-cli-level=INFO
pytest tests/integration -rxXs --cov=earthaccess --cov-report=term-missing "${@}" --capture=no --tb=native --log-cli-level=INFO
RET=$?
set +x

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_store_can_create_s3_fsspec_session(self):


@pytest.mark.xfail(
reason="This test reproduces a bug (#610) which has not yet been fixed."
reason="Expected failure: Reproduces a bug (#610) that has not yet been fixed."
)
def test_earthaccess_file_getattr():
fs = fsspec.filesystem("memory")
Expand Down

0 comments on commit 50bf0b9

Please sign in to comment.