コード例 #1
0
    def test_create_parameter_dictionary(self):
        from biocrnpyler import Parameter

        parameters = Parameter.create_parameter_dictionary(parameters=None,
                                                           parameter_file=None)

        self.assertEqual(parameters, None)

        with self.assertRaises(FileNotFoundError):
            Parameter.create_parameter_dictionary(parameters={},
                                                  parameter_file='dummy_file')
コード例 #2
0
ファイル: test_parameter.py プロジェクト: yyx0531/BioCRNPyler
    def test_create_parameter_dictionary(self):

        # test that no parameter dictionary or parameter files are given empty parameter dict is returned
        empty_dict = {}
        parameters = Parameter.create_parameter_dictionary(parameters=None,
                                                           parameter_file=None)
        self.assertEqual(parameters, empty_dict)

        # test that no parameter file is given then the supplied parameter dictionary is returned
        param_dict = {'kb': 10.0}
        parameters = Parameter.create_parameter_dictionary(
            parameters=param_dict, parameter_file=None)
        self.assertEqual(parameters, param_dict)

        with self.assertRaises(FileNotFoundError):
            Parameter.create_parameter_dictionary(parameters={},
                                                  parameter_file='dummy_file')