-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwynik_testow.txt
More file actions
219 lines (189 loc) · 9.9 KB
/
wynik_testow.txt
File metadata and controls
219 lines (189 loc) · 9.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
================================================= test session starts =================================================
platform win32 -- Python 3.12.10, pytest-9.0.1, pluggy-1.6.0
rootdir: D:\emisja
configfile: pytest.ini
collected 3 items
tests\e2e\test_options_dialog.py F
tests\e2e\test_saramix_automix.py F
tests\e2e\test_smoke_start_close.py .
====================================================== FAILURES =======================================================
____________________________________________ test_options_dialog_roundtrip ____________________________________________
tmp_path = WindowsPath('C:/Users/m/AppData/Local/Temp/pytest-of-m/pytest-32/test_options_dialog_roundtrip0')
def test_options_dialog_roundtrip(tmp_path):
app = _start_app(tmp_path)
try:
main = _wait_for_main(app, title_re="SARA", timeout=90.0)
try:
main.wait("exists", timeout=90)
main.wait("visible", timeout=20)
except Exception:
# diagnostic: list windows if main not found
windows = Desktop(backend="uia").windows()
print(
"Open windows (uia):",
[(w.window_text(), getattr(w, "process_id", lambda: None)()) for w in windows],
)
raise
main.set_focus()
_menu_select_with_fallbacks(
main,
paths=[
"Options…",
"Options...",
"Opcje…",
"Opcje...",
"Tools->Options…",
"Tools->Options...",
"Narzêdzia->Opcje…",
"Narzêdzia->Opcje...",
],
key_sequences=["%to", "%t o", "%no", "%n o"], # Alt+T then O (English/Polish UI)
names=["Options", "Opcje"],
)
dialog = app.window(title_re="Options|Opcje")
dialog = _wait_for_child_dialog(app, exclude_handle=main.handle, timeout=10) or dialog
> dialog.wait("exists", timeout=10)
tests\e2e\test_options_dialog.py:198:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
venv_user\Lib\site-packages\pywinauto\application.py:529: in wait
wait_until(timeout, retry_interval,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout = 10, retry_interval = 0.09, func = <function WindowSpecification.wait.<locals>.<lambda> at 0x00000271942D0C20>
value = True, op = <built-in function eq>, args = (), kwargs = {}, start = 74166.9662504, func_val = False
time_left = -0.06186699999670964, err = TimeoutError('timed out')
def wait_until(timeout,
retry_interval,
func,
value=True,
op=operator.eq,
*args, **kwargs):
r"""
Wait until ``op(function(*args, **kwargs), value)`` is True or until timeout expires
* **timeout** how long the function will try the function
* **retry_interval** how long to wait between retries
* **func** the function that will be executed
* **value** the value to be compared against (defaults to True)
* **op** the comparison function (defaults to equality)\
* **args** optional arguments to be passed to func when called
* **kwargs** optional keyword arguments to be passed to func when called
Returns the return value of the function
If the operation times out then the return value of the the function
is in the 'function_value' attribute of the raised exception.
e.g. ::
try:
# wait a maximum of 10.5 seconds for the
# the objects item_count() method to return 10
# in increments of .5 of a second
wait_until(10.5, .5, self.item_count, 10)
except TimeoutError as e:
print("timed out")
"""
start = timestamp()
func_val = func(*args, **kwargs)
# while the function hasn't returned what we are waiting for
while not op(func_val, value):
# find out how much of the time is left
time_left = timeout - (timestamp() - start)
# if we have to wait some more
if time_left > 0:
# wait either the retry_interval or else the amount of
# time until the timeout expires (whichever is less)
time.sleep(min(retry_interval, time_left))
func_val = func(*args, **kwargs)
else:
err = TimeoutError("timed out")
err.function_value = func_val
> raise err
E pywinauto.timings.TimeoutError: timed out
venv_user\Lib\site-packages\pywinauto\timings.py:375: TimeoutError
______________________________________________ test_saramix_automix_flow ______________________________________________
tmp_path = WindowsPath('C:/Users/m/AppData/Local/Temp/pytest-of-m/pytest-32/test_saramix_automix_flow0')
def test_saramix_automix_flow(tmp_path):
src_m3u = Path(__file__).resolve().parents[1].parent / "logs" / "saramix.m3u"
if not src_m3u.exists():
pytest.skip("logs/saramix.m3u not present")
app = _start_app(tmp_path)
try:
main = _wait_for_main(app, title_re="SARA", timeout=90.0)
try:
main.wait("exists", timeout=90)
main.wait("visible", timeout=20)
except Exception:
windows = Desktop(backend="uia").windows()
print(
"Open windows (uia):",
[(w.window_text(), getattr(w, "process_id", lambda: None)()) for w in windows],
)
raise
_menu_select_with_fallbacks(
main,
paths=[
"Tools->Toggle auto mix",
"Tools->Auto mix toggle",
"Narzêdzia->Prze³¹cz automix",
"Auto mix",
"Automix",
],
key_sequences=["^+m"],
names=["Auto mix", "Automix"],
)
> _import_m3u(main, src_m3u)
tests\e2e\test_saramix_automix.py:197:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests\e2e\test_saramix_automix.py:81: in _import_m3u
dialog.wait("exists", timeout=10)
venv_user\Lib\site-packages\pywinauto\application.py:529: in wait
wait_until(timeout, retry_interval,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
timeout = 10, retry_interval = 0.09, func = <function WindowSpecification.wait.<locals>.<lambda> at 0x00000271942D2020>
value = True, op = <built-in function eq>, args = (), kwargs = {}, start = 74200.7506928, func_val = False
time_left = -0.035976200000732206, err = TimeoutError('timed out')
def wait_until(timeout,
retry_interval,
func,
value=True,
op=operator.eq,
*args, **kwargs):
r"""
Wait until ``op(function(*args, **kwargs), value)`` is True or until timeout expires
* **timeout** how long the function will try the function
* **retry_interval** how long to wait between retries
* **func** the function that will be executed
* **value** the value to be compared against (defaults to True)
* **op** the comparison function (defaults to equality)\
* **args** optional arguments to be passed to func when called
* **kwargs** optional keyword arguments to be passed to func when called
Returns the return value of the function
If the operation times out then the return value of the the function
is in the 'function_value' attribute of the raised exception.
e.g. ::
try:
# wait a maximum of 10.5 seconds for the
# the objects item_count() method to return 10
# in increments of .5 of a second
wait_until(10.5, .5, self.item_count, 10)
except TimeoutError as e:
print("timed out")
"""
start = timestamp()
func_val = func(*args, **kwargs)
# while the function hasn't returned what we are waiting for
while not op(func_val, value):
# find out how much of the time is left
time_left = timeout - (timestamp() - start)
# if we have to wait some more
if time_left > 0:
# wait either the retry_interval or else the amount of
# time until the timeout expires (whichever is less)
time.sleep(min(retry_interval, time_left))
func_val = func(*args, **kwargs)
else:
err = TimeoutError("timed out")
err.function_value = func_val
> raise err
E pywinauto.timings.TimeoutError: timed out
venv_user\Lib\site-packages\pywinauto\timings.py:375: TimeoutError
=============================================== short test summary info ===============================================
FAILED tests/e2e/test_options_dialog.py::test_options_dialog_roundtrip - pywinauto.timings.TimeoutError: timed out
FAILED tests/e2e/test_saramix_automix.py::test_saramix_automix_flow - pywinauto.timings.TimeoutError: timed out
======================================= 2 failed, 1 passed in 71.26s (0:01:11) ========================================