refactor(tests): streamline test cases for ApiResponse, Board, GameContext, Piece, and Square

This commit is contained in:
2026-04-05 22:10:13 +02:00
parent 3cec5b8898
commit 03c3b90d06
8 changed files with 96 additions and 227 deletions
+12 -10
View File
@@ -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)