refactor(tests): streamline test cases for ApiResponse, Board, GameContext, Piece, and Square
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import glob,re,os
|
||||
rows=[]
|
||||
for f in glob.glob('modules/*/build/test-results/test/TEST-*.xml'):
|
||||
txt=open(f,encoding='utf-8').read(500)
|
||||
m1=re.search(r'name="([^"]+)"',txt)
|
||||
m2=re.search(r'tests="(\d+)"',txt)
|
||||
if m1 and m2:
|
||||
rows.append((int(m2.group(1)),f,m1.group(1)))
|
||||
for n,f,name in sorted(rows, reverse=True)[:20]:
|
||||
print(f'{n:3} {name} ({f})')
|
||||
import glob,re
|
||||
mods=['api','core','io','rule','ui']
|
||||
tot=0
|
||||
for m in mods:
|
||||
s=0
|
||||
for f in glob.glob(f'modules/{m}/build/test-results/test/TEST-*.xml'):
|
||||
txt=open(f,encoding='utf-8').read(300)
|
||||
m2=re.search(r'tests="(\d+)"',txt)
|
||||
if m2:s+=int(m2.group(1))
|
||||
print(f'{m}: {s}')
|
||||
tot+=s
|
||||
print('overall:',tot)
|
||||
Reference in New Issue
Block a user