Skip to content
Open
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
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
pip install pytest-cov django
pytest --cov=./ --cov-report=xml

- name: Report test coverage to DeepSource
run: |
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage.xml
# - name: Report test coverage to DeepSource
# run: |
# curl https://deepsource.io/cli | sh
# ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
# ./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage.xml
14 changes: 13 additions & 1 deletion assignment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import hashlib

FIRST = [1, 2, 3]
SECOND = [1, 2, 3]
p = [1, 2, 3]
Expand All @@ -22,10 +24,20 @@ def tested_foo():
return 5


def untested_foo():
def print_new_lines():
print("New line 4")
print("New line 5")
print("New line 6")
print("New line 8")
print("New line 9")
print("New line 10")


def compute_file_hashes(files=[], hash_algorithm=hashlib.md5) -> dict:
hashes = dict()
for file in files:
f = open(file)
hashed = hash_algorithm(f.read())
hashes[file] = hashed

return hashes