Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
-Dsonar.organization=vitruviansoftware
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.sources=src/cli_code
-Dsonar.tests=test_dir
-Dsonar.tests=tests
-Dsonar.sourceEncoding=UTF-8
-Dsonar.scm.provider=git
-Dsonar.coverage.jacoco.xmlReportPaths=coverage.xml
Expand Down
26 changes: 7 additions & 19 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,10 @@
except ImportError:
PYTEST_AVAILABLE = False

def pytest_ignore_collect(path):
"""
Determine which test files to ignore during collection.

Args:
path: Path object representing a test file or directory

Returns:
bool: True if the file should be ignored, False otherwise
"""
# Check if we're running in CI
in_ci = os.environ.get('CI', 'false').lower() == 'true'

if in_ci:
# Skip comprehensive test files in CI environments
if '_comprehensive' in str(path):
return True

return False
def pytest_ignore_collect(path, config):
"""Ignore tests containing '_comprehensive' in their path when CI=true."""
# if os.environ.get("CI") == "true" and "_comprehensive" in str(path):
# print(f"Ignoring comprehensive test in CI: {path}")
# return True
# return False
pass # Keep the function valid syntax, but effectively do nothing.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ markers =
requires_openai: marks tests that require openai module
timeout: marks tests with a timeout
pythonpath = src
testpaths = tests test_dir
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sonar.projectVersion=0.2.1

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=src/cli_code
sonar.tests=test_dir
sonar.tests=tests

# Coverage report paths
sonar.python.coverage.reportPaths=coverage.xml
Expand Down
51 changes: 0 additions & 51 deletions test_dir/conftest.py

This file was deleted.

Loading