Skip to content

Commit

Permalink
revert test skipping when checking for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Apr 23, 2024
1 parent fa23321 commit b13299f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions tests/conftest.py
Expand Up @@ -22,30 +22,30 @@
"""
STANDARD_TEST_PIPE_ID = "default_pipeline_name"

# try:
# subprocess.check_output(
# "docker inspect pipestat_test_db --format '{{.State.Status}}'", shell=True
# )
# SERVICE_UNAVAILABLE = False
# except:
# register(print, f"Some tests require a test database. To initiate it, run:\n{DB_CMD}")
# SERVICE_UNAVAILABLE = True
#
# try:
# result = subprocess.check_output(
# "pipestat report --c 'tests/data/config.yaml' -i 'name_of_something' -v 'test_value' -r 'dependency_value'",
# shell=True,
# )
# DB_DEPENDENCIES = True
# except:
# register(
# print,
# f"Warning: you must install dependencies with pip install pipestat['dbbackend'] to run database tests.",
# )
# DB_DEPENDENCIES = False

SERVICE_UNAVAILABLE = False
DB_DEPENDENCIES = True
try:
subprocess.check_output(
"docker inspect pipestat_test_db --format '{{.State.Status}}'", shell=True
)
SERVICE_UNAVAILABLE = False
except:
register(print, f"Some tests require a test database. To initiate it, run:\n{DB_CMD}")
SERVICE_UNAVAILABLE = True

try:
result = subprocess.check_output(
"pipestat report --c 'tests/data/config.yaml' -i 'name_of_something' -v 'test_value' -r 'dependency_value'",
shell=True,
)
DB_DEPENDENCIES = True
except:
register(
print,
f"Warning: you must install dependencies with pip install pipestat['dbbackend'] to run database tests.",
)
DB_DEPENDENCIES = False

# SERVICE_UNAVAILABLE = False
# DB_DEPENDENCIES = True


def get_data_file_path(filename: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tests/data/config.yaml
@@ -1,6 +1,6 @@
project_name: test
record_identifier: sample1
schema_path: sample_output_schema.yaml
schema_path: sample_output_schema_recursive.yaml
database:
dialect: postgresql
driver: psycopg
Expand Down

0 comments on commit b13299f

Please sign in to comment.