Coverage for intelligence_toolkit/tests/unit/helpers/test_constants.py: 100%
22 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-10-16 13:41 -0300
« prev ^ index » next coverage.py v7.10.7, created at 2025-10-16 13:41 -0300
1# Copyright (c) 2024 Microsoft Corporation. All rights reserved.
2# Licensed under the MIT license. See LICENSE file in the project.
3#
4import os
6from intelligence_toolkit.helpers import constants
9def test_pdf_encoding():
10 assert constants.PDF_ENCODING == "UTF-8"
13def test_pdf_margin_inches():
14 assert constants.PDF_MARGIN_INCHES == 0.75
15 assert isinstance(constants.PDF_MARGIN_INCHES, float)
18def test_attribute_value_separator():
19 assert constants.ATTRIBUTE_VALUE_SEPARATOR == "=="
22def test_cache_path_exists():
23 assert constants.CACHE_PATH is not None
24 assert isinstance(constants.CACHE_PATH, str)
25 assert os.path.exists(constants.CACHE_PATH)
28def test_cache_path_contains_intelligence_toolkit():
29 assert "intelligence-toolkit-data" in constants.CACHE_PATH
30 assert "cache" in constants.CACHE_PATH
33def test_vector_store_max_retries():
34 assert constants.VECTOR_STORE_MAX_RETRIES == 5
35 assert isinstance(constants.VECTOR_STORE_MAX_RETRIES, int)
38def test_vector_store_max_retries_wait_time():
39 assert constants.VECTOR_STORE_MAX_RETRIES_WAIT_TIME == 1
40 assert isinstance(constants.VECTOR_STORE_MAX_RETRIES_WAIT_TIME, int)