Skip to content

Commit 2c09271

Browse files
muirdmmeta-codesync[bot]
authored andcommitted
tests: fix traceback for integration tests
Summary: Set `__unittest = True` in testcase.py so stack frames from testcase.py are skipped by default. This fixes test output not showing the actual test assertion that failed. Reviewed By: vilatto Differential Revision: D90263225 fbshipit-source-id: 4889a826bc3c381867a2aea84a2e6e1e17351e9e
1 parent 50cb8c4 commit 2c09271

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eden/test_support/testcase.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
from . import environment_variable as env_module
1818
from .temporary_directory import TempFileManager
1919

20+
# Tell Python's unittest traceback handling to hide frames from this module
21+
# so test failures show the actual test code, not our wrapper methods.
22+
__unittest = True
23+
2024

2125
def _is_forkpty_deprecation_warning(w: warnings.WarningMessage) -> bool:
2226
"""Check if a warning is the forkpty deprecation warning from pty.py.

0 commit comments

Comments
 (0)