예제 #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)
예제 #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)
예제 #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)
예제 #4
0
파일: test_cli.py 프로젝트: vvarp/PyUpdater
 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)
예제 #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'])
예제 #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'])