Ejemplo n.º 1
0
 def test_key_value_args(self):
     assert tools.parse_args( ["--test", "foo"] ) == [ ("--test", "foo") ]
     assert tools.parse_args( ["--test", "foo",
                               "-a",
                               "--bar", "baz"] ) == [ ("--test", "foo"),
                                                      ("-a", ""),
                                                      ("--bar", "baz") ]
Ejemplo n.º 2
0
 def test_single_args(self):
     assert tools.parse_args( ["--test"] ) == [ ("--test", "") ]
     assert tools.parse_args( ["-a", "-b", "--c"] ) == [ ("-a", ""),
                                                         ("-b", ""),
                                                         ("--c", "") ]
Ejemplo n.º 3
0
 def test_args_can_be_len_0(self):
     assert tools.parse_args( [] ) == []