コード例 #1
0
ファイル: config_test.py プロジェクト: Bajoo/client-pc
    def test_loadWithExistingFile(self):
        config_path = _get_config_file_path()

        if exists(config_path):
            os.remove(config_path)

        assert catcher.lastLogRecord is None
        load()
        assert catcher.lastLogRecord is not None
コード例 #2
0
ファイル: config_test.py プロジェクト: Bajoo/client-pc
    def test_loadWithoutExistingFile(self):
        config_path = _get_config_file_path()

        if exists(config_path):
            os.remove(config_path)

        # create a config file
        set('lang', 'plop')

        assert catcher.lastLogRecord is None
        load()
        assert catcher.lastLogRecord is None

        assert get('lang') == 'plop'