本文整理汇总了Python中pybuilder.cli.parse_options函数的典型用法代码示例。如果您正苦于以下问题:Python parse_options函数的具体用法?Python parse_options怎么用?Python parse_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了parse_options函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_should_set_multiple_properties
def test_should_set_multiple_properties(self):
options, arguments = parse_options(["-P", "spam=eggs",
"-P", "foo=bar"])
self.assert_options(options, property_overrides={"spam": "eggs",
"foo": "bar"})
self.assertEquals([], arguments)
示例2: test_should_parse_start_project_without_options
def test_should_parse_start_project_without_options(self):
options, arguments = parse_options(["clean", "spam"])
self.assert_options(options)
self.assertEquals(["clean", "spam"], arguments)
示例3: test_should_parse_empty_arguments
def test_should_parse_empty_arguments(self):
options, arguments = parse_options([])
self.assert_options(options)
self.assertEquals([], arguments)
示例4: test_should_parse_multiple_environments
def test_should_parse_multiple_environments(self):
options, arguments = parse_options(["-E", "spam", "-E", "eggs"])
self.assert_options(options, environments=["spam", "eggs"])
self.assertEquals([], arguments)
示例5: test_should_parse_single_environment
def test_should_parse_single_environment(self):
options, arguments = parse_options(["-E", "spam"])
self.assert_options(options, environments=["spam"])
self.assertEquals([], arguments)
示例6: test_should_set_property
def test_should_set_property(self):
options, arguments = parse_options(["-P", "spam=eggs"])
self.assert_options(options, property_overrides={"spam": "eggs"})
self.assertEquals([], arguments)
示例7: test_should_parse_arguments_and_option
def test_should_parse_arguments_and_option(self):
options, arguments = parse_options(["-X", "-D", "spam", "eggs"])
self.assert_options(options, debug=True, project_directory="spam")
self.assertEquals(["eggs"], arguments)
示例8: test_should_parse_empty_arguments_with_option
def test_should_parse_empty_arguments_with_option(self):
options, arguments = parse_options(["-X"])
self.assert_options(options, debug=True)
self.assertEquals([], arguments)
示例9: test_should_parse_empty_environments
def test_should_parse_empty_environments(self):
options, arguments = parse_options([])
self.assert_options(options, environments=[])
self.assertEqual([], arguments)
示例10: test_should_parse_task_list_without_options
def test_should_parse_task_list_without_options(self):
options, arguments = parse_options(["clean", "spam"])
self.assert_options(options)
self.assertEqual(["clean", "spam"], arguments)