Beispiel #1
0
 def test_execution(self, parser, pyu):
     pyu.setup()
     subparser = make_subparser(parser)
     add_make_spec_parser(subparser)
     with io.open("app.py", "w", encoding="utf-8") as f:
         f.write('print "Hello World"')
     opts, other = parser.parse_known_args(["make-spec", "-F", "app.py"])
     commands._cmd_make_spec(opts, other)
Beispiel #2
0
 def test_execution(self, parser, pyu):
     pyu.setup()
     subparser = make_subparser(parser)
     add_make_spec_parser(subparser)
     with io.open('app.py', 'w', encoding='utf-8') as f:
         f.write('print "Hello World"')
     opts, other = parser.parse_known_args(['make-spec', '-F', 'app.py'])
     commands._cmd_make_spec(opts, other)
Beispiel #3
0
 def test_execution(self, parser, pyu):
     pyu.setup()
     subparser = make_subparser(parser)
     add_make_spec_parser(subparser)
     with io.open('app.py', 'w', encoding='utf-8') as f:
         f.write('print "Hello World"')
     opts, other = parser.parse_known_args(['make-spec', '-F',
                                            'app.py'])
     commands._cmd_make_spec(opts, other)
Beispiel #4
0
 def test_deprecated_opts(self, parser, pyu):
     pyu.setup()
     subparser = make_subparser(parser)
     add_make_spec_parser(subparser)
     with io.open('app.py', 'w', encoding='utf-8') as f:
         f.write('print "Hello World"')
     opts, other = parser.parse_known_args(
         ['make-spec', '-F', '--app-version=0.1.0', 'app.py'])
     make_spec(opts, other)
Beispiel #5
0
 def test_no_options(self, parser):
     subparser = make_subparser(parser)
     add_make_spec_parser(subparser)
     with pytest.raises(SystemExit):
         assert parser.parse_known_args(['make-spec'])
Beispiel #6
0
 def test_no_options(self, parser):
     subparser = make_subparser(parser)
     add_make_spec_parser(subparser)
     with pytest.raises(SystemExit):
         assert parser.parse_known_args(['make-spec'])