зеркало из https://github.com/microsoft/azure-cli.git
more workaround
This commit is contained in:
Родитель
11cf57b18f
Коммит
1a407f6507
|
@ -472,12 +472,12 @@ Global Arguments
|
||||||
# there is an argparse bug on <2.7.10 where SystemExit is not thrown on missing required param
|
# there is an argparse bug on <2.7.10 where SystemExit is not thrown on missing required param
|
||||||
if sys.version_info < (2, 7, 10):
|
if sys.version_info < (2, 7, 10):
|
||||||
app.execute('n1 -fb a --foobar value'.split())
|
app.execute('n1 -fb a --foobar value'.split())
|
||||||
|
app.execute('n1 -fb a --foobar2 value --foobar3 extra'.split())
|
||||||
else:
|
else:
|
||||||
with self.assertRaises(SystemExit):
|
with self.assertRaises(SystemExit):
|
||||||
app.execute('n1 -fb a --foobar value'.split())
|
app.execute('n1 -fb a --foobar value'.split())
|
||||||
|
with self.assertRaises(SystemExit):
|
||||||
with self.assertRaises(SystemExit):
|
app.execute('n1 -fb a --foobar2 value --foobar3 extra'.split())
|
||||||
app.execute('n1 -fb a --foobar2 value --foobar3 extra'.split())
|
|
||||||
|
|
||||||
self.assertTrue('required' in io.getvalue()
|
self.assertTrue('required' in io.getvalue()
|
||||||
and '--foobar/-fb' not in io.getvalue()
|
and '--foobar/-fb' not in io.getvalue()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче