@@ -41,6 +41,7 @@ def verify_valid_flag(self, cmd_line):
41
41
self .assertNotIn (b'Traceback' , err )
42
42
return out
43
43
44
+ @support .cpython_only
44
45
def test_help (self ):
45
46
self .verify_valid_flag ('-h' )
46
47
self .verify_valid_flag ('-?' )
@@ -51,14 +52,17 @@ def test_help(self):
51
52
self .assertNotIn (b'-X dev' , out )
52
53
self .assertLess (len (lines ), 50 )
53
54
55
+ @support .cpython_only
54
56
def test_help_env (self ):
55
57
out = self .verify_valid_flag ('--help-env' )
56
58
self .assertIn (b'PYTHONHOME' , out )
57
59
60
+ @support .cpython_only
58
61
def test_help_xoptions (self ):
59
62
out = self .verify_valid_flag ('--help-xoptions' )
60
63
self .assertIn (b'-X dev' , out )
61
64
65
+ @support .cpython_only
62
66
def test_help_all (self ):
63
67
out = self .verify_valid_flag ('--help-all' )
64
68
lines = out .splitlines ()
@@ -77,6 +81,7 @@ def test_optimize(self):
77
81
def test_site_flag (self ):
78
82
self .verify_valid_flag ('-S' )
79
83
84
+ @support .cpython_only
80
85
def test_version (self ):
81
86
version = ('Python %d.%d' % sys .version_info [:2 ]).encode ("ascii" )
82
87
for switch in '-V' , '--version' , '-VV' :
@@ -142,6 +147,7 @@ def run_python(*args):
142
147
else :
143
148
self .assertEqual (err , b'' )
144
149
150
+ @support .cpython_only
145
151
def test_xoption_frozen_modules (self ):
146
152
tests = {
147
153
('=on' , 'FrozenImporter' ),
@@ -570,6 +576,7 @@ def test_del___main__(self):
570
576
print ("del sys.modules['__main__']" , file = script )
571
577
assert_python_ok (filename )
572
578
579
+ @support .cpython_only
573
580
def test_unknown_options (self ):
574
581
rc , out , err = assert_python_failure ('-E' , '-z' )
575
582
self .assertIn (b'Unknown option: -z' , err )
@@ -684,6 +691,7 @@ def run_xdev(self, *args, check_exitcode=True, xdev=True):
684
691
self .assertEqual (proc .returncode , 0 , proc )
685
692
return proc .stdout .rstrip ()
686
693
694
+ @support .cpython_only
687
695
def test_xdev (self ):
688
696
# sys.flags.dev_mode
689
697
code = "import sys; print(sys.flags.dev_mode)"
@@ -858,6 +866,7 @@ def test_argv0_normalization(self):
858
866
self .assertEqual (proc .returncode , 0 , proc )
859
867
self .assertEqual (proc .stdout .strip (), b'0' )
860
868
869
+ @support .cpython_only
861
870
def test_parsing_error (self ):
862
871
args = [sys .executable , '-I' , '--unknown-option' ]
863
872
proc = subprocess .run (args ,
0 commit comments