updated spidey test

This commit is contained in:
vky 2022-06-25 22:27:43 +02:00
parent 08ca0b1858
commit 6b9d3511b9
1 changed files with 10 additions and 8 deletions

View File

@ -25,20 +25,22 @@ class SpideyTest(test_template.TestTemplate):
self.is_infected = False
lines = 0
with open(os.path.join(paths[0], "index.js")) as f:
for line in f:
lines += 1 # TODO: you don't actually need to count the lines, you can just check if it's more than 1
if lines > 1:
self.is_infected = True
for _ in f:
lines += 1
if lines > 1:
self.is_infected = True
break
self.progress = 50
# time.sleep(5)
lines = 0
with open(os.path.join(paths[1], "index.js")) as f:
for line in f:
lines += 1 # TODO: you don't actually need to count the lines, you can just check if it's more than 1
if lines > 1:
self.is_infected = True
for _ in f:
lines += 1
if lines > 1:
self.is_infected = True
break
# self.is_infected = True
if self.is_infected: # TODO: set a status here, explaining and why the test failed, the scary part will be handled by the main program