Example #1
0
    def test_analysis_module_no_hit(self):

        active_name = "FOO"
        modules = []
        name = cli._get_analysis_module_name(active_name,
                                             modules,
                                             iterable=True)

        self.assertIsNone(name)
Example #2
0
    def test_analysis_module_name_in_module(self):

        active_name = "STD_ENKF"
        modules = ['STD_ENKF']
        name = cli._get_analysis_module_name(active_name,
                                             modules,
                                             iterable=True)

        self.assertEqual(name, "STD_ENKF")
Example #3
0
    def test_analysis_module_items_in_module(self):

        active_name = "FOO"
        modules = ["BAR"]
        name = cli._get_analysis_module_name(active_name,
                                             modules,
                                             iterable=True)

        self.assertEqual(name, "BAR")
Example #4
0
    def test_analysis_module_name_not_iterable(self):

        active_name = "STD_ENKF"
        modules = [
            'BOOTSTRAP_ENKF', 'CV_ENKF', 'FWD_STEP_ENKF', 'NULL_ENKF',
            'SQRT_ENKF', 'STD_ENKF'
        ]
        name = cli._get_analysis_module_name(active_name,
                                             modules,
                                             iterable=True)

        self.assertEqual(name, "STD_ENKF")