"""
Test configuration loading

@author aevans
"""

import os

from nlp_server.config import load_config


def test_load_config():
    """
    Test loading a configuration
    """
    current_dir = os.path.curdir
    test_path = os.path.sep.join([current_dir, 'data', 'test_config.json'])
    cfg = load_config.load_config(test_path)
    assert cfg is not None
    assert cfg.use_gpu is False

[((17, 16, 17, 75), 'os.path.sep.join', 'os.path.sep.join', ({(17, 33, 17, 74): "[current_dir, 'data', 'test_config.json']"}, {}), "([current_dir, 'data', 'test_config.json'])", False, 'import os\n'), ((18, 10, 18, 44), 'nlp_server.config.load_config.load_config', 'load_config.load_config', ({(18, 34, 18, 43): 'test_path'}, {}), '(test_path)', False, 'from nlp_server.config import load_config\n')]