mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
23 lines
627 B
Python
23 lines
627 B
Python
import os
|
|
|
|
singletypepath = 'tests/singletype'
|
|
mixedtypepath = 'tests/mixedtype'
|
|
|
|
def test_file(filepath):
|
|
return os.system("./pocketpy " + filepath) == 0
|
|
#return os.system("python3 " + filepath) == 0
|
|
|
|
def test_dir(path):
|
|
print("=" * 50)
|
|
for filename in os.listdir(path):
|
|
if filename.endswith('.py'):
|
|
filepath = os.path.join(path, filename)
|
|
code = test_file(filepath)
|
|
if not code:
|
|
print("[x] " + filepath)
|
|
else:
|
|
print("[√] " + filepath)
|
|
|
|
if __name__ == '__main__':
|
|
test_dir(singletypepath)
|
|
test_dir(mixedtypepath) |