Files

20 lines
754 B
Python

"""Exercise the folder-only desktop entry point against actual renamed DWGs."""
import sys,time
from pathlib import Path
sys.path.insert(0,str(Path(__file__).resolve().parents[1]/'tools'))
from desktop_app import AutoApp,WORKSPACE,tk
root=tk.Tk();root.withdraw()
app=AutoApp(root)
app.folder.set(str(WORKSPACE/'outputs/package_renamed_013'))
app.start()
deadline=time.monotonic()+180
while app.busy and time.monotonic()<deadline:
root.update()
time.sleep(.05)
assert not app.busy,'GUI worker timed out'
assert app.last_output,app.text.get('1.0','end')
assert list(app.last_output.glob('*.xlsx'))
assert list(app.last_output.glob('*.json'))
root.destroy()
print('PASS: desktop folder selection, extraction worker, Excel output, completion state')