Lines Matching refs:opts
47 opts, args = getopt.do_shorts([], 'a', 'a', [])
48 self.assertEqual(opts, [('-a', '')])
51 opts, args = getopt.do_shorts([], 'a1', 'a:', [])
52 self.assertEqual(opts, [('-a', '1')])
59 opts, args = getopt.do_shorts([], 'a', 'a:', ['1'])
60 self.assertEqual(opts, [('-a', '1')])
63 opts, args = getopt.do_shorts([], 'a', 'a:', ['1', '2'])
64 self.assertEqual(opts, [('-a', '1')])
71 opts, args = getopt.do_longs([], 'abc', ['abc'], [])
72 self.assertEqual(opts, [('--abc', '')])
75 opts, args = getopt.do_longs([], 'abc=1', ['abc='], [])
76 self.assertEqual(opts, [('--abc', '1')])
79 opts, args = getopt.do_longs([], 'abc=1', ['abcd='], [])
80 self.assertEqual(opts, [('--abcd', '1')])
83 opts, args = getopt.do_longs([], 'abc', ['ab', 'abc', 'abcd'], [])
84 self.assertEqual(opts, [('--abc', '')])
90 opts, args = getopt.do_longs([], 'foo=42', ['foo-bar', 'foo=',], [])
91 self.assertEqual(opts, [('--foo', '42')])
104 opts, args = getopt.getopt(cmdline, 'a:b', ['alpha=', 'beta'])
105 self.assertEqual(opts, [('-a', '1'), ('-b', ''),
119 opts, args = getopt.gnu_getopt(cmdline, 'ab:', ['alpha', 'beta='])
121 self.assertEqual(opts, [('-a', ''), ('-b', '1'),
125 opts, args = getopt.gnu_getopt(['-a', '-', '-b', '-'], 'ab:', [])
127 self.assertEqual(opts, [('-a', ''), ('-b', '-')])
130 opts, args = getopt.gnu_getopt(cmdline, '+ab:', ['alpha', 'beta='])
131 self.assertEqual(opts, [('-a', '')])
136 opts, args = getopt.gnu_getopt(cmdline, 'ab:', ['alpha', 'beta='])
137 self.assertEqual(opts, [('-a', '')])