File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
utils/build_swift/tests/argparse Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -255,20 +255,15 @@ def test_default_attributes(self):
255
255
self .assertIsInstance (action .type , PathType )
256
256
257
257
def test_exists (self ):
258
- pass
258
+ action = actions . StorePathAction ([ '--foo' ], dests = [ 'foo' ], exists = True )
259
259
260
- def test_executable (self ):
261
- parser = ArgumentParser ()
262
- parser .add_argument ('--foo' , action = actions .StorePathAction ,
263
- executable = True )
260
+ self .assertTrue (action .type .assert_exists )
264
261
265
- bash_path = '/bin/bash'
266
- if os .path .exists (bash_path ) and os .access (bash_path , os .X_OK ):
267
- with self .assertNotRaises (ArgumentTypeError ):
268
- parser .parse_args (['--foo' , bash_path ])
262
+ def test_executable (self ):
263
+ action = actions .StorePathAction (['--foo' ], dests = ['foo' ],
264
+ executable = True )
269
265
270
- with self .assertRaises (SystemExit ):
271
- parser .parse_args (['--foo' , __file__ ])
266
+ self .assertTrue (action .type .assert_executable )
272
267
273
268
274
269
class TestToggleTrueAction (TestCase ):
You can’t perform that action at this time.
0 commit comments