Esempio n. 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')
Esempio n. 2
0
    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')