Esempio n. 1
0
 def test_parse_args_default_2(self):
     namespace = parse_args(
         argv=["f1", "f2", "--poetry='--otherarg -E docs'"])
     assert namespace.filenames == ["f1", "f2"]
     assert namespace.requirements == "requirements.txt"
     assert namespace.verbose == 0
     assert namespace.poetry == ['--otherarg', '-E', 'docs']
Esempio n. 2
0
 def test_parse_args_requirements(self):
     args = parse_args(argv=[
         "f1", "f2", "--requirements", "r.txt",
         "--poetry='--without-hashes'"
     ])
     assert args.filenames == ["f1", "f2"]
     assert args.requirements == "r.txt"
     assert args.verbose == 0
     assert args.poetry == ["--without-hashes"]
Esempio n. 3
0
 def test_parse_args_extras2(self):
     args = parse_args(argv=["f1", "f2", "--poetry='-E docs -E lint'"])
     assert args.filenames == ["f1", "f2"]
     assert args.requirements == "requirements.txt"
     assert args.verbose == 0
     assert args.poetry == ["-E", "docs", "-E", "lint"]
Esempio n. 4
0
 def test_parse_args_extras1(self):
     args = parse_args(argv=["f1", "f2", "--poetry='-E docs'"])
     assert args.filenames == ["f1", "f2"]
     assert args.requirements == "requirements.txt"
     assert args.verbose == 0
     assert args.poetry == ['-E', 'docs']
Esempio n. 5
0
 def test_parse_args_dev(self):
     args = parse_args(argv=["f1", "f2", "--poetry='-D'"])
     assert args.filenames == ["f1", "f2"]
     assert args.requirements == "requirements.txt"
     assert args.verbose == 0
Esempio n. 6
0
 def test_parse_args_vvv(self):
     args = parse_args(argv=["f1", "f2", "-vvv"])
     assert args.filenames == ["f1", "f2"]
     assert args.requirements == "requirements.txt"
     assert args.verbose == 3