mirror of
https://github.com/cwinfo/hyperboria-peers.git
synced 2024-11-12 22:10:27 +00:00
Update tests.py to allow a single file to be tested, to help work towards #22
This commit is contained in:
parent
5c1ff011e4
commit
b492c2a908
4
tests.py
4
tests.py
@ -39,7 +39,11 @@ def validate(path):
|
|||||||
print(" %sInvalid JSON!%s" % (RED, END))
|
print(" %sInvalid JSON!%s" % (RED, END))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
success = True
|
success = True
|
||||||
|
if len(sys.argv) == 2:
|
||||||
|
success = validate(sys.argv[1])
|
||||||
|
else:
|
||||||
for directory, subdirs, files in os.walk('.'):
|
for directory, subdirs, files in os.walk('.'):
|
||||||
if len(files) > 0:
|
if len(files) > 0:
|
||||||
for f in files:
|
for f in files:
|
||||||
|
Loading…
Reference in New Issue
Block a user