Beispiel #1
0
 def test_negative(self):
     a = Args("l:bool,p:int,d:str", "-l -d usr/log -p -9")
     self.assertEqual(a.get_value("p"), -9)
Beispiel #2
0
 def test_normal(self):
     a = Args("l:bool,p:int,d:str", "-l true -d usr/log -p 8080")
     self.assertEqual(a.get_value("l"), True)
     self.assertEqual(a.get_value("d"), "usr/log")
     self.assertEqual(a.get_value("p"), 8080)
Beispiel #3
0
 def test_missing(self):
     a = Args("l:bool,p:int,d:str", "-l -d usr/log -p 8080")
     self.assertEqual(a.get_value("l"), False)