Exemple #1
0
    def test_split_args_on_emtpy_init_returns_empty_dict(self):
        test_kargs = {
            f"{INIT_KEY}.test.class.init_1": 1,
            f"{INIT_KEY}.testclass.init_2": 2,
        }

        init_args, method_args = remote_runner.split_args(test_kargs)

        self.assertDictEqual(init_args, {'init_1': 1, 'init_2': 2})
        self.assertDictEqual(method_args, {})
Exemple #2
0
    def test_split_args_on_emtpy_method_returns_empty_dict(self):
        test_kargs = {
            f"{METHOD_KEY}.testclass.method_1": 1,
            f"{METHOD_KEY}.testclass.method_2": 2
        }

        init_args, method_args = remote_runner.split_args(test_kargs)

        self.assertDictEqual(init_args, {})
        self.assertDictEqual(method_args, {'method_1': 1, 'method_2': 2})
Exemple #3
0
    def test_split_args_separates_init_and_method_args(self):
        test_kwargs = {
            f"{INIT_KEY}.test.class.init_1": 1,
            f"{INIT_KEY}.testclass.init_2": 2,
            f"{METHOD_KEY}.testclass.method_1": 1,
            f"{METHOD_KEY}.testclass.method_2": 2
        }

        init_args, method_args = remote_runner.split_args(test_kwargs)

        self.assertDictEqual(init_args, {'init_1': 1, 'init_2': 2})
        self.assertDictEqual(method_args, {'method_1': 1, 'method_2': 2})