Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 def test_should_parse_empty_arguments_with_option (self):
     options, arguments = parse_options(["-X"])
     
     self.assert_options(options, debug=True)
     self.assertEquals([], arguments)
Beispiel #4
0
 def test_should_parse_task_list_without_options (self):
     options, arguments = parse_options(["clean", "spam"])
     
     self.assert_options(options)
     self.assertEquals(["clean", "spam"], arguments)
Beispiel #5
0
 def test_should_parse_empty_arguments (self):
     options, arguments = parse_options([])
     
     self.assert_options(options)
     self.assertEquals([], arguments)
Beispiel #6
0
    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)
Beispiel #7
0
    def test_should_parse_single_environment (self):
        options, arguments = parse_options(["-E", "spam"])

        self.assert_options(options, environments=["spam"])
        self.assertEquals([], arguments)
Beispiel #8
0
 def test_should_set_property (self):
     options, arguments = parse_options(["-P", "spam=eggs"])
     
     self.assert_options(options, property_overrides={"spam": "eggs"})
     self.assertEquals([], arguments)