Skip to content

Commit b4b7cd0

Browse files
committed
fix: exclude build directory in tests
1 parent 168d760 commit b4b7cd0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/CI-pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
3535
- name: Pylint Source
3636
run: |
37-
find . -type f -name '*.py' | xargs pylint --extension-pkg-whitelist='pydantic'
37+
find . -type f -name '*.py' | grep -v './build/' | xargs pylint --extension-pkg-whitelist='pydantic'

.github/workflows/CI-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
3535
- name: Run Tests
3636
run: |
37-
pytest --timeout=120 --timeout_method=thread --cov=runpod --cov-report=xml --cov-report=term-missing --cov-fail-under=100 -W error -p no:cacheprovider -p no:unraisableexception
37+
pytest --ignore=build --timeout=120 --timeout_method=thread --cov=runpod --cov-report=xml --cov-report=term-missing --cov-fail-under=100 -W error -p no:cacheprovider -p no:unraisableexception

tests/test_version.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
def test_version_found():
88
""" Test that the version is found """
9-
with patch('runpod.version.get_distribution', return_value=Mock(version='1.0.0')) as mock_get_distribution:
9+
with patch('runpod.version.get_distribution') as mock_get_distribution:
10+
mock_get_distribution.return_value = Mock(version='1.0.0')
1011
assert get_version() == '1.0.0'
1112
assert mock_get_distribution.called
1213

1314
def test_version_not_found():
1415
""" Test that the version is not found """
15-
with patch('runpod.version.get_distribution', side_effect=DistributionNotFound) as mock_get_distribution:
16+
with patch('runpod.version.get_distribution') as mock_get_distribution:
17+
mock_get_distribution.side_effect = DistributionNotFound
1618
assert get_version() == 'unknown'
1719
assert mock_get_distribution.called

0 commit comments

Comments
 (0)