@@ -38,6 +38,7 @@ def verify_valid_flag(self, cmd_line):
38
38
self .assertNotIn (b'Traceback' , err )
39
39
return out
40
40
41
+ @support .cpython_only
41
42
def test_help (self ):
42
43
self .verify_valid_flag ('-h' )
43
44
self .verify_valid_flag ('-?' )
@@ -48,14 +49,17 @@ def test_help(self):
48
49
self .assertNotIn (b'-X dev' , out )
49
50
self .assertLess (len (lines ), 50 )
50
51
52
+ @support .cpython_only
51
53
def test_help_env (self ):
52
54
out = self .verify_valid_flag ('--help-env' )
53
55
self .assertIn (b'PYTHONHOME' , out )
54
56
57
+ @support .cpython_only
55
58
def test_help_xoptions (self ):
56
59
out = self .verify_valid_flag ('--help-xoptions' )
57
60
self .assertIn (b'-X dev' , out )
58
61
62
+ @support .cpython_only
59
63
def test_help_all (self ):
60
64
out = self .verify_valid_flag ('--help-all' )
61
65
lines = out .splitlines ()
@@ -74,6 +78,7 @@ def test_optimize(self):
74
78
def test_site_flag (self ):
75
79
self .verify_valid_flag ('-S' )
76
80
81
+ @support .cpython_only
77
82
def test_version (self ):
78
83
version = ('Python %d.%d' % sys .version_info [:2 ]).encode ("ascii" )
79
84
for switch in '-V' , '--version' , '-VV' :
@@ -139,6 +144,7 @@ def run_python(*args):
139
144
else :
140
145
self .assertEqual (err , b'' )
141
146
147
+ @support .cpython_only
142
148
def test_xoption_frozen_modules (self ):
143
149
tests = {
144
150
('=on' , 'FrozenImporter' ),
@@ -567,6 +573,7 @@ def test_del___main__(self):
567
573
print ("del sys.modules['__main__']" , file = script )
568
574
assert_python_ok (filename )
569
575
576
+ @support .cpython_only
570
577
def test_unknown_options (self ):
571
578
rc , out , err = assert_python_failure ('-E' , '-z' )
572
579
self .assertIn (b'Unknown option: -z' , err )
@@ -681,6 +688,7 @@ def run_xdev(self, *args, check_exitcode=True, xdev=True):
681
688
self .assertEqual (proc .returncode , 0 , proc )
682
689
return proc .stdout .rstrip ()
683
690
691
+ @support .cpython_only
684
692
def test_xdev (self ):
685
693
# sys.flags.dev_mode
686
694
code = "import sys; print(sys.flags.dev_mode)"
@@ -855,6 +863,7 @@ def test_argv0_normalization(self):
855
863
self .assertEqual (proc .returncode , 0 , proc )
856
864
self .assertEqual (proc .stdout .strip (), b'0' )
857
865
866
+ @support .cpython_only
858
867
def test_parsing_error (self ):
859
868
args = [sys .executable , '-I' , '--unknown-option' ]
860
869
proc = subprocess .run (args ,
0 commit comments