Esempio n. 1
0
 def test_construct_arg(self, name, params):
     a = Argument.construct_arg(name, params)
     assert a.name == name
     assert a.flags == ('-s', '--some-arg')
Esempio n. 2
0
 def test_construct_arg_exceptions(self, name, params, exception):
     with pytest.raises(exception):
         Argument.construct_arg(name, params)
Esempio n. 3
0
 def test_argument_whoami_gui_hint(self):
     a = Argument.construct_arg('some_arg', {'use': 'snippet1'})
     assert a.get_gui_hint('default') == getpass.getuser()
Esempio n. 4
0
 def test_construct_arg_exceptions(self, name, params, exception):
     with pytest.raises(exception):
         Argument.construct_arg(name, params)
Esempio n. 5
0
 def test_construct_arg(self, name, params):
     a = Argument.construct_arg(name, params)
     assert a.name == name
     assert a.flags == ('-s', '--some-arg')
Esempio n. 6
0
 def test_argument_whoami_gui_hint(self):
     a = Argument.construct_arg('some_arg',{'use':'snippet1'})
     assert a.get_gui_hint('default') == getpass.getuser()
Esempio n. 7
0
 def test_argument_whoami_gui_hint(self):
     a = Argument.construct_arg("some_arg", {"use": "snippet1"})
     assert a.get_gui_hint("default") == getpass.getuser()