|
import pytest
|
|
from pr import config
|
|
|
|
|
|
class TestConfig:
|
|
|
|
def test_default_model_exists(self):
|
|
assert hasattr(config, 'DEFAULT_MODEL')
|
|
assert isinstance(config.DEFAULT_MODEL, str)
|
|
assert len(config.DEFAULT_MODEL) > 0
|
|
|
|
def test_api_url_exists(self):
|
|
assert hasattr(config, 'DEFAULT_API_URL')
|
|
assert config.DEFAULT_API_URL.startswith('http')
|
|
|
|
def test_file_paths_exist(self):
|
|
assert hasattr(config, 'DB_PATH')
|
|
assert hasattr(config, 'LOG_FILE')
|
|
assert hasattr(config, 'HISTORY_FILE')
|
|
|
|
def test_autonomous_config(self):
|
|
assert hasattr(config, 'MAX_AUTONOMOUS_ITERATIONS')
|
|
assert config.MAX_AUTONOMOUS_ITERATIONS > 0
|
|
|
|
assert hasattr(config, 'CONTEXT_COMPRESSION_THRESHOLD')
|
|
assert config.CONTEXT_COMPRESSION_THRESHOLD > 0
|
|
|
|
def test_language_keywords(self):
|
|
assert hasattr(config, 'LANGUAGE_KEYWORDS')
|
|
assert 'python' in config.LANGUAGE_KEYWORDS
|
|
assert isinstance(config.LANGUAGE_KEYWORDS['python'], list)
|