Beispiel #1
0
 def testFromArgv(self, args, outs, exception=False):
     import sys
     sys.argv = args
     if exception:
         self.assertRaises(ValueError, Channel.fromArgv)
     else:
         ch = Channel.fromArgv()
         self.assertListEqual(Channel.fromArgv(), outs)
Beispiel #2
0
def test_fromargs_exc():
    import sys
    sys.argv = ["prog", "a1,a2", "b1", "c1,c2"]
    with pytest.raises(ValueError):
        Channel.fromArgv()
Beispiel #3
0
def test_fromargs(args, expt):
    import sys
    sys.argv = args
    assert Channel.fromArgv() == expt