Beispiel #1
0
    def test_additional_old_params(self):
        "Command Line Parser: too many args"

        args = ["-f", "SomeFile", "das", "ist", "was"]
        options = CmdLineParams.create_dicts(args)
        assert(options[0]["general"]["command_line_arguments"] == \
               ['das', 'ist', 'was'])
Beispiel #2
0
    def rmttest_neg_01(self):
        "Command Line Parser: check -m."

        args = ["-f", "SomeFile"]
        options = CmdLineParams.create_dicts(args)
        mod_dir = distutils.sysconfig.get_python_lib()
        assert [mod_dir] == options[1]["global"]["modules"]["directories"]
Beispiel #3
0
    def test_additional_old_params(self):
        "Command Line Parser: too many args"

        args = ["-f", "SomeFile", "das", "ist", "was"]
        options = CmdLineParams.create_dicts(args)
        assert(options[0]["general"]["command_line_arguments"] == \
               ['das', 'ist', 'was'])
Beispiel #4
0
    def test_neg_01(self):
        "Command Line Parser: check -m."

        args = ["-f", "SomeFile" ]
        options = CmdLineParams.create_dicts(args)
        assert(options[1]["global"]["modules"]["directories"] == \
               ["/usr/share/pyshared"])
    def rmttest_neg_01(self):
        "Command Line Parser: check -m."

        args = ["-f", "SomeFile"]
        options = CmdLineParams.create_dicts(args)
        mod_dir = distutils.sysconfig.get_python_lib()
        self.assertEqual([mod_dir],
                         options[1]["global"]["modules"]["directories"])
Beispiel #6
0
 def merge_cmd_line_params(self, args):
     '''Merges the command line arguments into the 
        existing configuration.'''
     ldicts = CmdLineParams.create_dicts(args)
     for ldict in ldicts:
         self.__merge_dictionary(ldict)
    def test_neg_01(self):
        "Command Line Parser: check -m."

        args = ["-f", "SomeFile"]
        options = CmdLineParams.create_dicts(args)
        assert options[1]["global"]["modules"]["directories"] == ["/usr/share/pyshared"]