Skip to content

Re-enable NSKIP003 - #861

Merged
ppenna merged 1 commit into
nanvix/v3.12.3from
nskip/003
Aug 5, 2026
Merged

ppenna merged 1 commit into
nanvix/v3.12.3from
nskip/003

Conversation

@ada-x64

@ada-x64 ada-x64 commented Jul 31, 2026

Copy link
Copy Markdown

Closes #471

What

Remove NSKIP003 guards in test_os / test_exceptions / test_shutil / test_json.

Why

Redundant: requires_subprocess() already skips these. subprocess itself is still unsupported.
Verified the full lifecycle on Linux.

Copilot AI lite review requested due to automatic review settings July 31, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes Nanvix-specific NSKIP003 skip guards from several tests, with the intent to rely on test.support.requires_subprocess()/has_subprocess_support to skip subprocess-dependent tests on platforms where subprocess is unsupported (e.g., Nanvix).

Changes:

  • Removed @unittest.skipIf(support.is_nanvix, "NSKIP003: no subprocess support") guards from selected tests in test_os, test_shutil, test_exceptions, and test_json.
  • Standardized skip behavior to prefer requires_subprocess() where present (notably test_json/test_tool.py).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Lib/test/test_shutil.py Removes Nanvix skip around test_stty_match() (but this test still calls subprocess directly and needs a subprocess guard).
Lib/test/test_os.py Removes Nanvix skip around TermsizeTests.test_stty_match() (but this test still calls subprocess directly and needs a subprocess guard).
Lib/test/test_json/test_tool.py Drops redundant Nanvix skip since the class is already decorated with @support.requires_subprocess().
Lib/test/test_exceptions.py Drops Nanvix skips on tests that use script_helper.assert_python_*() (these already raise SkipTest when subprocess is unsupported).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Lib/test/test_os.py
# NSKIP003 https://github.com/nanvix/cpython/issues/471
@unittest.skipIf(support.is_nanvix,
"NSKIP003: no subprocess support")
def test_stty_match(self):
Comment thread Lib/test/test_shutil.py
Comment on lines 3224 to 3227
@unittest.skipUnless(os.isatty(sys.__stdout__.fileno()), "not on tty")
@unittest.skipUnless(hasattr(os, 'get_terminal_size'),
'need os.get_terminal_size()')
# NSKIP003 https://github.com/nanvix/cpython/issues/471
@unittest.skipIf(support.is_nanvix,
"NSKIP003: no subprocess support")
def test_stty_match(self):
Copilot AI review requested due to automatic review settings August 3, 2026 14:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Lib/test/test_os.py:4020

  • test_stty_match() uses subprocess.check_output() but isn’t decorated with @support.requires_subprocess(). After removing the Nanvix skip, this test can run on platforms without subprocess/fork/exec support (Nanvix, WASI, Emscripten) and error instead of skipping.
    def test_stty_match(self):
        """Check if stty returns the same results

Lib/test/test_shutil.py:3227

  • test_stty_match() calls subprocess.check_output() directly, but after removing the Nanvix guard it will now run on platforms where support.has_subprocess_support is false (e.g., Nanvix), and can fail with ENOSYS/NotImplementedError rather than being skipped. Add @support.requires_subprocess() so the test is consistently skipped when subprocess isn’t supported.
    @unittest.skipUnless(os.isatty(sys.__stdout__.fileno()), "not on tty")
    @unittest.skipUnless(hasattr(os, 'get_terminal_size'),
                         'need os.get_terminal_size()')
    def test_stty_match(self):

@ada-x64
ada-x64 marked this pull request as ready for review August 3, 2026 14:41
Redundant: requires_subprocess() already skips these. subprocess itself is still unsupported.
Copilot AI review requested due to automatic review settings August 5, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

Suppressed comments (2)

Lib/test/test_shutil.py:3227

  • test_stty_match() invokes subprocess.check_output() directly but no longer has a Nanvix/subprocess guard. Since test.support.has_subprocess_support is false on Nanvix/wasm platforms, this should be decorated with @support.requires_subprocess() to avoid hard failures when subprocess is unavailable.
    @unittest.skipUnless(os.isatty(sys.__stdout__.fileno()), "not on tty")
    @unittest.skipUnless(hasattr(os, 'get_terminal_size'),
                         'need os.get_terminal_size()')
    def test_stty_match(self):

Lib/test/test_os.py:3998

  • TermsizeTests.test_stty_match() uses subprocess.check_output() but the Nanvix-specific skip was removed and there is no @support.requires_subprocess() decorator. On platforms without subprocess support (Nanvix/wasm), this will raise before the existing FileNotFoundError/CalledProcessError skip logic can run. Add @support.requires_subprocess() to make the skip consistent with test.support.has_subprocess_support.
    def test_stty_match(self):
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@ppenna
ppenna merged commit 928c010 into nanvix/v3.12.3 Aug 5, 2026
13 checks passed
@ppenna
ppenna deleted the nskip/003 branch August 5, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NSKIP003] no subprocess support

3 participants