diff --git a/test/loader/test_loader.py b/test/loader/test_loader.py index fe826a6f..e5ddc3a6 100644 --- a/test/loader/test_loader.py +++ b/test/loader/test_loader.py @@ -34,18 +34,14 @@ class TestConfigLoader(unittest.TestCase): test_arg = ConfigSection() ConfigLoader("config", "").load_config(os.path.join("./test/loader", "config"), {"test": test_arg}) - #ConfigLoader("config", "").load_config("/home/ygxu/github/fastNLP_testing/fastNLP/test/loader/config", - # {"test": test_arg}) + section = read_section_from_config(os.path.join("./test/loader", "config"), "test") - #dict = read_section_from_config("/home/ygxu/github/fastNLP_testing/fastNLP/test/loader/config", "test") - dict = read_section_from_config(os.path.join("./test/loader", "config"), "test") - - for sec in dict: - if (sec not in test_arg) or (dict[sec] != test_arg[sec]): + for sec in section: + if (sec not in test_arg) or (section[sec] != test_arg[sec]): raise AttributeError("ERROR") for sec in test_arg.__dict__.keys(): - if (sec not in dict) or (dict[sec] != test_arg[sec]): + if (sec not in section) or (section[sec] != test_arg[sec]): raise AttributeError("ERROR") try: