コード例 #1
0
ファイル: TestCmdLineParams.py プロジェクト: joesteeve/rmtoo
    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'])
コード例 #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"]
コード例 #3
0
ファイル: TestCmdLineParams.py プロジェクト: samjaninf/rmtoo
    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'])
コード例 #4
0
ファイル: TestCmdLineParams.py プロジェクト: samjaninf/rmtoo
    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"])
コード例 #5
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()
        self.assertEqual([mod_dir],
                         options[1]["global"]["modules"]["directories"])
コード例 #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)
コード例 #7
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"]