Repository navigation
Re-enable NSKIP012 - #862
Conversation
There was a problem hiding this comment.
Pull request overview
This PR re-enables LongReprTest in Lib/test/test_reprlib.py by removing the Nanvix-specific NSKIP012 module guard, based on the claim that the rmdir cleanup behavior that motivated the skip is now fixed.
Changes:
- Remove the
@unittest.skipIf(support.is_nanvix, ...)NSKIP012 skip fromLongReprTestintest_reprlib.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # NSKIP012 https://github.com/nanvix/cpython/issues/480 | ||
| @unittest.skipIf(support.is_nanvix, "NSKIP012: rmtree/rmdir returns ENOSYS") | ||
| class LongReprTest(unittest.TestCase): |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Lib/test/test_reprlib.py:589
- With the NSKIP012 decorator removed,
LongReprTestwill now run on Nanvix. However, this test’stearDown()usesos.rmdir()directly (nottest.support.os_helper.rmdir/rmtree), and the test support helpers still document/swallowerrno.ENOSYSfor Nanvixrmdir()(seeLib/test/support/os_helper.py). If standalone Nanvix still returnsENOSYS, this test will fail during teardown rather than being skipped.
Consider narrowing the guard to support.is_nanvix_standalone (so hosted Nanvix is still exercised), or alternatively reworking tearDown() to use os_helper.rmdir/rmtree so cleanup can tolerate ENOSYS.
class LongReprTest(unittest.TestCase):
longname = 'areallylongpackageandmodulenametotestreprtruncation'
rmdir cleanup no longer errors; the decorator is stale.
There was a problem hiding this comment.
Review details
Suppressed comments (1)
Lib/test/test_reprlib.py:589
- Removing the NSKIP012 guard makes LongReprTest run on Nanvix, but this test still requires a working os.rmdir()/os.mkdir() lifecycle (setUp calls shutil.rmtree(..., ignore_errors=True) then os.mkdir(), and tearDown uses os.rmdir directly). If Nanvix standalone still returns ENOSYS for rmdir (the original NSKIP012 failure mode), this will error in setUp/tearDown rather than being isolated to regrtest cleanup.
If the intent is only to re-enable hosted Nanvix (where support._force_run swallows errno 88 in regrtest teardown), consider restoring the skip but narrowing it to standalone only.
class LongReprTest(unittest.TestCase):
longname = 'areallylongpackageandmodulenametotestreprtruncation'
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
Closes #480
What
Remove NSKIP012 guard on test_reprlib. (support-level rmdir/errno swallows left for a follow-up.)
Why
rmdir cleanup no longer errors; the decorator is stale.
Verified the full lifecycle on Linux.