Skip to content

Commit

Permalink
Fix coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Van Brunt committed Sep 24, 2024
1 parent f2c815d commit 48b4b2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bin/tests_n_reports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -e
echo 'Running tests....'
coverage run -m pytest

echo 'Running report....'
coverage report -m
echo 'Generating report....'
coverage xml
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
sonar.projectKey=cb-devrel-carbon-black-cloud-sdk-python
sonar.python.coverage.reportPaths=coverage.xml

# Define the same root directory for sources and tests
sonar.sources = src/
sonar.tests = src/
Expand Down
7 changes: 0 additions & 7 deletions src/cbc_sdk/cache/lru.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ def withlock(self, *args, **kwargs):
return func(self, *args, **kwargs)
else:
return func(self, *args, **kwargs)

withlock.__name__ == func.__name__
return withlock


Expand Down Expand Up @@ -137,11 +135,6 @@ def __init__(self, cache, peek_duration=60):
cache (LRUCacheDict): The cache to be monitored.
peek_duration (int): The delay between "sweeps" of the cache.
"""
me = self

def kill_self(o):
me

self.ref = weakref.ref(cache)
self.peek_duration = peek_duration
super(LRUCacheDict.EmptyCacheThread, self).__init__()
Expand Down

0 comments on commit 48b4b2e

Please sign in to comment.