Skip to content

Commit 2159714

Browse files
committed
pytest import test fix
1 parent 13c5b86 commit 2159714

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/python-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
flake8 src/ssri.py --count --select=E9,F63,F7,F82 --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4141
- name: Test with pytest
4242
run: |
43-
pytest tests
43+
python -m pytest -s -vv

tests/test_stuff.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def test_checkFiles(snapshot):
8181
for template in checkIncludes[0].items():
8282
ssri.writeTextToFiles(template[0], template[1], True)
8383
arrayOfMatchesOfNot = [] # an array that will be filled with the output of filecmp
84-
for filesToCompare in zip(inputFiles[1].sort(),knownGoodFiles[1].sort()):
84+
list1 = sorted(inputFiles[1])
85+
list2 = sorted(knownGoodFiles[1])
86+
for filesToCompare in zip(list1, list2):
8587
sitesFile, knownGoodFile = tuple(filesToCompare)
8688
arrayOfMatchesOfNot.append(filecmp.cmp(sitesFile, knownGoodFile, shallow=False))
8789
assert arrayOfMatchesOfNot == snapshot

0 commit comments

Comments
 (0)