Repository navigation
Expand file tree
/
Copy pathfixtures.py
More file actions
592 lines (528 loc) · 25.4 KB
/
Copy pathfixtures.py
File metadata and controls
592 lines (528 loc) · 25.4 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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
#!/usr/bin/env python3
"""Named, self-verifying VirtualDJ states for argument probing.
Unknown arguments are silently ignored (`loaded bogusword` -> `yes`), so an
argument form can only be confirmed by comparing values across forms **in a
state where those forms would disagree**. `loaded opposite` says nothing with
both decks empty. This module is that missing half: named states, each
established over the HTTP channel and each **asserting its own preconditions
before any probe runs**.
The contract every fixture keeps:
1. `setup` runs, then `assertions` are polled until they all hold or the
deadline passes. A fixture that cannot verify itself raises `FixtureError`
— a probe against an unestablished state is worse than no probe at all.
2. `teardown` returns the app to the deck contents and transport state
observed at `establish()` time, not to some assumed-clean baseline.
3. Fixture audio is generated locally (ffmpeg, a 120 BPM pulse train), never
the user's library, so results do not depend on what is in the collection.
python3 tools/fixtures.py --list
python3 tools/fixtures.py --establish one_deck_loaded
python3 tools/fixtures.py --establish loop_active --hold 5 --teardown
python3 tools/fixtures.py --check # offline: validate definitions
`--establish` changes live app state and some fixtures start playback, which
makes sound. See docs/HTTP Control Interface.md for the channel's semantics and
its error-code taxonomy.
"""
from __future__ import annotations
import argparse
import http.client
import json
from datetime import datetime, timezone
import shutil
import subprocess
import sys
import tempfile
import time
import urllib.parse
from dataclasses import dataclass, field
from pathlib import Path
from typing import Callable
HOST, PORT = "localhost", 80
TIMEOUT = 10
POLL_SECONDS = 0.25
DEFAULT_DEADLINE = 8.0
AUDIO_DIR = Path.home() / "Library/Caches/virtualdj-api-reference/fixtures"
AUDIO_NAME = "fixture-120bpm.wav"
AUDIO_SECONDS = 90
AUDIO_BPM = 120
# 0.2 amplitude, one decaying 440 Hz burst every 0.5 s -> a 120 BPM pulse train
# VirtualDJ can beatgrid, quiet enough not to dominate a room.
AUDIO_EXPR = r"0.2*sin(2*PI*440*t)*exp(-8*mod(t\,0.5))" # comma escaped for lavfi
class FixtureError(RuntimeError):
"""A fixture could not be established, or could not verify itself."""
class Channel:
"""GET /query and /execute against the local Network Control plugin."""
def __init__(self, host: str = HOST, port: int = PORT, timeout: int = TIMEOUT):
self.host, self.port, self.timeout = host, port, timeout
self._conn: http.client.HTTPConnection | None = None
def _request(self, endpoint: str, script: str) -> str:
path = f"/{endpoint}?" + urllib.parse.urlencode({"script": script})
for attempt in (1, 2):
try:
if self._conn is None:
self._conn = http.client.HTTPConnection(self.host, self.port,
timeout=self.timeout)
self._conn.request("GET", path)
return self._conn.getresponse().read().decode(errors="replace").strip()
except Exception:
self.close()
if attempt == 2:
raise
raise AssertionError("unreachable")
def close(self) -> None:
if self._conn is not None:
try:
self._conn.close()
finally:
self._conn = None
def query(self, script: str) -> str:
return self._request("query", script)
def execute(self, script: str) -> str:
return self._request("execute", script)
def reachable(self) -> bool:
try:
return self.query("get_version") != ""
except Exception:
return False
def provenance(self) -> dict:
"""Read identity from the running app before any fixture mutation."""
build = self.query("get_build")
if not build.isdecimal():
raise FixtureError(f"cannot stamp capture: get_build returned {build!r}")
return {"build": build, "build_query": "get_build", "channel": "HTTP",
"captured_at": datetime.now(timezone.utc).isoformat()}
def is_error(value: str) -> bool:
return value.startswith("error:")
def yes(value: str) -> bool:
return value == "yes"
def no(value: str) -> bool:
return value == "no"
def nonzero_number(value: str) -> bool:
try:
return float(value) != 0.0
except ValueError:
return False
@dataclass(frozen=True)
class Assertion:
"""One readback that must hold for the fixture to count as established."""
script: str
predicate: Callable[[str], bool]
describes: str
def check(self, channel: Channel) -> tuple[bool, str]:
value = channel.query(self.script)
return self.predicate(value), value
@dataclass(frozen=True)
class Fixture:
name: str
describes: str
setup: list[str]
assertions: list[Assertion]
# Checked ONCE before setup runs, never polled. A fixture whose teardown
# restores shared user state by resetting it — emptying a list rather than
# putting back what was there — is only safe when that state is already at
# the value teardown will leave it, so it says so here and refuses to
# establish otherwise.
preconditions: list[Assertion] = field(default_factory=list)
teardown: list[str] = field(default_factory=list)
decks: tuple[int, ...] = (1, 2)
plays_audio: bool = False
needs_audio_file: bool = True
deadline: float = DEFAULT_DEADLINE
def audio_path() -> Path:
return AUDIO_DIR / AUDIO_NAME
def ensure_audio(verbose: bool = True) -> Path:
"""Generate the fixture track once; reuse it afterwards."""
path = audio_path()
if path.exists():
return path
if shutil.which("ffmpeg") is None:
raise FixtureError("ffmpeg not found — needed once to generate the fixture track")
path.parent.mkdir(parents=True, exist_ok=True)
if verbose:
print(f"generating fixture audio ({AUDIO_SECONDS}s, {AUDIO_BPM} BPM) -> {path}")
subprocess.run(
["ffmpeg", "-loglevel", "error", "-y",
"-f", "lavfi", "-i", f"aevalsrc=exprs={AUDIO_EXPR}:d={AUDIO_SECONDS}:s=44100",
"-ac", "2", str(path)],
check=True)
return path
def load_script(deck: int, path: Path) -> str:
return f'deck {deck} load "{path}"'
def deck_state(channel: Channel, deck: int) -> dict[str, str]:
"""Enough to put a deck back the way it was found."""
return {
"loaded": channel.query(f"deck {deck} loaded"),
"path": channel.query(f'deck {deck} get_loaded_song "fullpath"'),
"playing": channel.query(f"deck {deck} play"),
}
def restore_deck(channel: Channel, deck: int, before: dict[str, str]) -> None:
if before["playing"] == "yes" and channel.query(f"deck {deck} play") == "no":
channel.execute(f"deck {deck} play")
elif before["playing"] == "no" and channel.query(f"deck {deck} play") == "yes":
channel.execute(f"deck {deck} pause")
if before["loaded"] == "no":
channel.execute(f"deck {deck} unload")
elif before["path"] and not is_error(before["path"]):
current = channel.query(f'deck {deck} get_loaded_song "fullpath"')
if current != before["path"]:
channel.execute(f'deck {deck} load "{before["path"]}"')
def build_fixtures(track: Path | None) -> dict[str, Fixture]:
"""Fixture definitions. `track` is None only for offline validation."""
t = track if track is not None else Path("<fixture track>")
load1, load2 = load_script(1, t), load_script(2, t)
long_track = Path(tempfile.gettempdir()) / "vdj-long-time-7500.flac"
return {f.name: f for f in [
Fixture(
name="parser_display_float",
describes="read-only Pioneer cuepoint display query on empty stopped deck 3; "
"binary literal oracles must match the recorded current-context calibration; "
"no physical controller identity or device rendering is established",
setup=[], teardown=[], decks=(), needs_audio_file=False,
assertions=[
Assertion("deck 3 get_deck", lambda v: v == "3", "deck 3 identity"),
Assertion("deck 3 loaded", lambda v: v == "no", "no media in fixture deck"),
Assertion("deck 3 play", lambda v: v == "no", "fixture deck stopped"),
],
),
Fixture(
name="parser_setting_eval",
describes="read-only videoRandomTransition comparison while the existing setting is on; "
"aborts if it differs, never changes it; generic evaluated-parameter caller",
setup=[], teardown=[], decks=(), needs_audio_file=False,
assertions=[
Assertion("setting 'videoRandomTransition'", lambda v: v == "yes", "existing setting value"),
Assertion("setting 'videoRandomTransition' on", lambda v: v == "yes", "literal equality oracle"),
Assertion("setting 'videoRandomTransition' off", lambda v: v == "no", "literal inequality oracle"),
],
),
Fixture(
name="parser_editor_help",
describes="read-only constant oracles for paired HTTP/editor-help comparisons; "
"UI observations and button restoration are separately required",
setup=[], teardown=[], decks=(), needs_audio_file=False,
assertions=[
Assertion("constant 37", lambda v: v == "37", "integer oracle"),
Assertion("constant 83", lambda v: v == "83", "distinct integer oracle"),
],
),
Fixture(
name="parser_constants",
describes="read-only constant oracles and distinct numeric deck identities; "
"no media, transport or variable mutations",
setup=[], teardown=[], decks=(), needs_audio_file=False,
assertions=[
Assertion("constant 37", lambda v: v == "37", "integer oracle"),
Assertion("constant 83", lambda v: v == "83", "distinct integer oracle"),
Assertion("deck 1 get_deck", lambda v: v == "1", "deck 1 identity"),
Assertion("deck 2 get_deck", lambda v: v == "2", "deck 2 identity"),
],
),
Fixture(
name="long_time",
describes="generated 7500-second track on empty, stopped deck 1; phase position, "
"pitch and display mode verified by probe_long_time.py",
setup=[load_script(1, long_track), "deck 1 pause"],
preconditions=[Assertion("deck 1 loaded", no, "deck 1 is empty"),
Assertion("deck 1 play", no, "deck 1 is stopped"),
Assertion("deck 1 loop", no, "deck 1 has no active loop")],
assertions=[Assertion("deck 1 loaded", yes, "fixture loaded"),
Assertion('deck 1 get_loaded_song "fullpath"',
lambda v: v == str(long_track), "generated long track selected"),
Assertion("deck 1 play", no, "fixture stopped")],
teardown=["deck 1 unload"], decks=(1,), deadline=30, needs_audio_file=False,
),
Fixture(
name="one_deck_loaded",
describes="deck 1 holds the fixture track, deck 2 empty",
setup=[load1, "deck 2 unload"],
assertions=[
Assertion("deck 1 loaded", yes, "deck 1 reports a track"),
Assertion("deck 2 loaded", no, "deck 2 reports empty"),
],
teardown=["deck 1 unload"],
),
Fixture(
name="both_decks_loaded",
describes="both decks hold the fixture track, neither playing",
setup=[load1, load2],
assertions=[
Assertion("deck 1 loaded", yes, "deck 1 reports a track"),
Assertion("deck 2 loaded", yes, "deck 2 reports a track"),
],
teardown=["deck 1 unload", "deck 2 unload"],
),
Fixture(
name="deck2_playing",
describes="deck 2 playing, deck 1 loaded and stopped — the asymmetry "
"`opposite`/`other`/`active` style arguments need",
setup=[load1, load2, "deck 1 pause", "deck 2 play"],
assertions=[
Assertion("deck 1 loaded", yes, "deck 1 reports a track"),
Assertion("deck 2 play", yes, "deck 2 reports playing"),
Assertion("deck 1 play", no, "deck 1 reports stopped"),
],
teardown=["deck 2 pause", "deck 1 unload", "deck 2 unload"],
plays_audio=True,
),
Fixture(
name="loop_active",
describes="deck 1 playing inside a 4-beat loop",
setup=[load1, "deck 1 play", "deck 1 loop 4"],
assertions=[
Assertion("deck 1 loop", yes, "deck 1 reports looping"),
Assertion("deck 1 get_loop", nonzero_number, "loop length is nonzero"),
],
teardown=["deck 1 loop_exit", "deck 1 pause", "deck 1 unload"],
plays_audio=True,
),
Fixture(
name="fx_slot_1_on",
describes="deck 1 loaded with effect slot 1 active",
setup=[load1, "deck 1 effect_active 1 on"],
assertions=[
Assertion("deck 1 effect_active 1", yes, "slot 1 reports active"),
],
teardown=["deck 1 effect_active 1 off", "deck 1 unload"],
),
Fixture(
name="sampler_slots_differ",
describes="several sampler slots hold DIFFERENT samples — the state that "
"separates an aggregate `all` from a slot-scoped one. Assert-only: "
"the shipped bank already provides it, so nothing is written",
setup=[],
assertions=[
Assertion("sampler_loaded 1", yes, "slot 1 holds a sample"),
Assertion("sampler_loaded 5", yes, "slot 5 holds a sample"),
Assertion("sampler_loaded 8", no, "slot 8 is empty, so `every` is falsifiable"),
Assertion("get_sample_name 1", lambda v: bool(v) and not is_error(v),
"slot 1 has a name"),
Assertion("get_sample_name 5", lambda v: bool(v) and not is_error(v),
"slot 5 has a different name"),
],
needs_audio_file=False,
),
Fixture(
name="automix_populated",
describes="the automix playlist holds the browser selection. Refuses "
"to run unless the playlist is EMPTY first, because its "
"teardown empties it rather than putting anything back. "
"Note `playlist_add` also LOADS the first queued track onto "
"an empty deck, which the deck restore undoes. It is not "
"enough for `get_automix_song`, which wants automix "
"actually running; `get_playlist_time` reads the list "
"directly and is what this state confirms",
setup=["playlist_add"],
preconditions=[
Assertion("file_count 'automix'", lambda v: v == "0",
"the automix playlist is empty, so clearing it restores "
"exactly what was found"),
],
assertions=[
Assertion("file_count 'automix'", nonzero_number,
"the automix playlist holds at least one track"),
],
teardown=["playlist_clear"],
needs_audio_file=False,
),
Fixture(
name="sideview_populated",
describes="the sideview list holds tracks — needed by file_count and the "
"browser/list parameters. Assert-only",
setup=[],
assertions=[
Assertion("file_count sideview", nonzero_number, "sideview reports tracks"),
],
needs_audio_file=False,
),
Fixture(
name="effect_armed",
describes="deck 1 loaded, effect slot 1 active and the deck arm engaged — the "
"state effect_arm_* parameters need. Round-trip verified before use",
setup=[load1, "deck 1 effect_active 1 on", "effect_arm_deck on"],
assertions=[
Assertion("effect_arm_deck", yes, "the deck arm reports engaged"),
Assertion("deck 1 effect_active 1", yes, "slot 1 reports active"),
],
teardown=["effect_arm_deck off", "deck 1 effect_active 1 off", "deck 1 unload"],
),
Fixture(
name="browser_populated",
describes="the browser holds a folder with tracks and one is browsed — enough for "
"the browsed_*/browser_* parameters. Assert-only: it reads whatever the "
"user is already browsing rather than navigating and failing to return",
setup=[],
assertions=[
Assertion("file_count", nonzero_number, "the browsed folder reports tracks"),
Assertion("get_browsed_folder", lambda v: bool(v) and not is_error(v),
"a folder is browsed"),
Assertion("get_browsed_filepath", lambda v: bool(v) and not is_error(v),
"a file is browsed"),
],
needs_audio_file=False,
),
Fixture(
name="known_positions",
describes="deck 1 stopped with cue 1, a loop start and a loop end at three "
"DISTINCT known positions — the state that separates get_time's "
"position arguments from a token it does not recognise. Every "
"position is asserted through an oracle that is not get_time. Distinctness of the\n three is checked by probe_known_positions.py, which reads them back\n and refuses to probe if any two coincide",
setup=[
load1, "deck 1 pause", "deck 1 goto_start",
"deck 1 set_cue 1 15000ms",
"deck 1 goto_start", "deck 1 goto +70",
# `loop N` lays an N-beat loop ENDING at the playhead.
"deck 1 loop 32",
# Off the loop-out point, so the playhead is distinct from every target.
"deck 1 goto -16",
],
assertions=[
Assertion("deck 1 loaded", yes, "deck 1 reports a track"),
Assertion("deck 1 play", no, "the deck is stopped — no playback drift"),
Assertion("deck 1 has_cue 1", yes, "cue 1 exists"),
Assertion("deck 1 loop", yes, "a loop is active"),
Assertion("deck 1 cue_pos 1 mseconly", nonzero_number,
"cue 1 has a position, read without get_time"),
Assertion("deck 1 get_loop_in_time on", nonzero_number,
"the loop start has a position, read without get_time"),
Assertion("deck 1 get_loop_out_time on", nonzero_number,
"the loop end has a position, read without get_time"),
],
teardown=["deck 1 loop_exit", "deck 1 delete_cue 1", "deck 1 unload"],
),
Fixture(
name="sampler_slot_loaded",
describes="sampler slot 1 holds a sample (shipped bank, not loaded by us)",
setup=[],
assertions=[
Assertion("sampler_loaded 1", yes, "sampler slot 1 reports loaded"),
],
needs_audio_file=False,
),
]}
def establish(channel: Channel, fixture: Fixture, verbose: bool = True) -> dict[int, dict]:
"""Run setup, then poll the assertions. Raise unless every one holds."""
unmet = []
for a in fixture.preconditions:
ok, value = a.check(channel)
if not ok:
unmet.append(f"{a.describes}: `{a.script}` -> {value!r}")
if unmet:
raise FixtureError(
f"fixture {fixture.name!r} refuses to establish — its teardown would "
f"not restore what it found:\n - " + "\n - ".join(unmet))
if verbose and fixture.preconditions:
for a in fixture.preconditions:
print(f" precond {a.describes}: ok")
before = {d: deck_state(channel, d) for d in fixture.decks}
for script in fixture.setup:
result = channel.execute(script)
if verbose:
print(f" setup {script!r} -> {result}")
deadline = time.monotonic() + fixture.deadline
failures: list[str] = []
while True:
failures = []
for a in fixture.assertions:
ok, value = a.check(channel)
if not ok:
failures.append(f"{a.describes}: `{a.script}` -> {value!r}")
if not failures:
break
if time.monotonic() >= deadline:
raise FixtureError(
f"fixture {fixture.name!r} did not establish within "
f"{fixture.deadline:.0f}s:\n - " + "\n - ".join(failures))
time.sleep(POLL_SECONDS)
if verbose:
for a in fixture.assertions:
print(f" verify {a.describes}: ok")
return before
def teardown(channel: Channel, fixture: Fixture, before: dict[int, dict] | None,
verbose: bool = True) -> None:
for script in fixture.teardown:
result = channel.execute(script)
if verbose:
print(f" teardown {script!r} -> {result}")
if before:
for deck, state in before.items():
restore_deck(channel, deck, state)
if verbose:
print(f" restored deck {deck} to {state['loaded']}"
f"{'/playing' if state['playing'] == 'yes' else ''}")
def cmd_list(fixtures: dict[str, Fixture]) -> int:
for f in fixtures.values():
audio = " [plays audio]" if f.plays_audio else ""
print(f"{f.name:22s} {f.describes}{audio}")
for a in f.assertions:
print(f"{'':22s} asserts: `{a.script}` — {a.describes}")
return 0
def cmd_check(fixtures: dict[str, Fixture]) -> int:
"""Offline validation: definitions only, so `just check` stays hermetic."""
errs = []
for name, f in fixtures.items():
if name != f.name:
errs.append(f"{name}: key does not match fixture name {f.name!r}")
if not f.assertions:
errs.append(f"{name}: no assertions — it could not verify itself")
if f.setup and not f.teardown and f.name != "sampler_slot_loaded":
errs.append(f"{name}: sets up but never tears down")
for a in f.assertions:
if not a.script.strip() or not callable(a.predicate):
errs.append(f"{name}: malformed assertion {a.script!r}")
if errs:
sys.exit("fixture check FAILED:\n - " + "\n - ".join(errs))
channel = Channel()
live = "reachable" if channel.reachable() else "not reachable (offline check only)"
print(f"fixture check passed: {len(fixtures)} fixtures, "
f"{sum(len(f.assertions) for f in fixtures.values())} assertions; "
f"channel {live}")
return 0
def main() -> int:
p = argparse.ArgumentParser()
p.add_argument("--list", action="store_true")
p.add_argument("--check", action="store_true")
p.add_argument("--establish", metavar="NAME")
p.add_argument("--verify", metavar="NAME", help="check assertions without running setup")
p.add_argument("--teardown", action="store_true", help="tear down after --establish")
p.add_argument("--hold", type=float, default=0.0, metavar="SECONDS")
p.add_argument("--json", action="store_true")
args = p.parse_args()
if args.list or args.check:
fixtures = build_fixtures(None)
return cmd_list(fixtures) if args.list else cmd_check(fixtures)
if not (args.establish or args.verify):
p.error("nothing to do: pass --list, --check, --establish or --verify")
name = args.establish or args.verify
channel = Channel()
if not channel.reachable():
raise FixtureError(
"HTTP channel unreachable on localhost:80 — is VirtualDJ running with the "
"Network Control plugin enabled? After a crash-recover the socket listens "
"but stops accepting; a full quit and relaunch is the only fix.")
fixtures = build_fixtures(None)
if name not in fixtures:
p.error(f"unknown fixture {name!r}; known: {', '.join(fixtures)}")
track = ensure_audio() if fixtures[name].needs_audio_file else None
fixture = build_fixtures(track)[name]
if args.verify:
results = [(a.describes, a.script, *a.check(channel)) for a in fixture.assertions]
if args.json:
print(json.dumps([{"describes": d, "script": s, "ok": ok, "value": v}
for d, s, ok, v in results], indent=1))
else:
for d, s, ok, v in results:
print(f" {'ok ' if ok else 'FAIL'} {d}: `{s}` -> {v!r}")
return 0 if all(r[2] for r in results) else 1
print(f"establishing {fixture.name}: {fixture.describes}")
before = establish(channel, fixture)
print(f"established {fixture.name}")
if args.hold:
time.sleep(args.hold)
if args.teardown:
teardown(channel, fixture, before)
print(f"torn down {fixture.name}")
return 0
if __name__ == "__main__":
try:
raise SystemExit(main())
except FixtureError as exc:
raise SystemExit(f"fixture error: {exc}")