Skip to content

Commit

Permalink
fix: tests configurations issue (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeryZebra-Yue authored Aug 19, 2024
1 parent c53f80f commit 826357a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ jobs:
pytest -p no:warnings --ignore=tests/integration/
pytest:
if: false
name: Pytest with Codecov
strategy:
matrix:
Expand Down
9 changes: 5 additions & 4 deletions tests/integration/configuration/test_configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@

def test_should_parse_single_config_file():
configuration: Configuration = load_configuration(
f"{current_path}/test_config.yaml"
f"{current_path}/test_config_v1.yaml"
)
assert configuration is not None
assert len(configuration.data_sources) == 3
assert len(configuration.metrics) == 5
assert len(configuration.validations) == 3


def test_should_parse_multiple_config_files():
configuration: Configuration = load_configuration(
f"{current_path}/test_configurations"
f"{current_path}/test_configurations_v1"
)
print(configuration)
assert configuration is not None
assert len(configuration.data_sources) == 2
assert len(configuration.metrics) == 2
assert len(configuration.validations) == 2
2 changes: 1 addition & 1 deletion tests/integration/configuration/test_configurations_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import pathlib

from datachecks.core.configuration.configuration_parser_v1 import (
from datachecks.core.configuration.configuration_parser import (
Configuration,
load_configuration,
)
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@

@pytest.fixture(scope="session")
def docker_compose_file(pytestconfig):
base_directory = os.path.dirname(os.path.abspath(__file__)).replace(
"tests/integration", ""
base_directory = (
os.path.dirname(os.path.abspath(__file__))
.replace("\\", "/")
.replace("tests/integration", "")
)
return os.path.join(base_directory, "docker-compose-test.yaml")

Expand Down

0 comments on commit 826357a

Please sign in to comment.