behave-trace 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,61 @@
1
+ """behave-trace — Trace viewer and step-by-step debugger for Behave BDD.
2
+
3
+ Two-phase model (like Playwright)::
4
+
5
+ # 1. Capture
6
+ behave --format behave-trace -o trace.json
7
+
8
+ # 2. Visualize
9
+ behave-trace show trace.json
10
+
11
+ Public API::
12
+
13
+ from behave_trace import TraceFormatter, Trace
14
+ from behave_trace import attach_screenshot, attach_dom, log
15
+ """
16
+
17
+ from __future__ import annotations
18
+
19
+ from .attach import attach_dom, attach_screenshot, attach_text, log
20
+ from .formatter import TraceFormatter
21
+ from .models import (
22
+ Artifact,
23
+ Background,
24
+ DataTable,
25
+ Environment,
26
+ ErrorInfo,
27
+ Feature,
28
+ Scenario,
29
+ Step,
30
+ Trace,
31
+ TraceStats,
32
+ )
33
+
34
+ __version__ = "0.1.0"
35
+
36
+ # Register formatter with Behave's internal registry (Behave 1.3.x doesn't
37
+ # auto-discover entry points — it uses a manual registry).
38
+ try:
39
+ from behave.formatter._registry import register_as
40
+
41
+ register_as("behave-trace", "behave_trace.formatter:TraceFormatter")
42
+ except Exception:
43
+ pass
44
+
45
+ __all__ = [
46
+ "Artifact",
47
+ "Background",
48
+ "DataTable",
49
+ "Environment",
50
+ "ErrorInfo",
51
+ "Feature",
52
+ "Scenario",
53
+ "Step",
54
+ "Trace",
55
+ "TraceFormatter",
56
+ "TraceStats",
57
+ "attach_dom",
58
+ "attach_screenshot",
59
+ "attach_text",
60
+ "log",
61
+ ]
@@ -0,0 +1,10 @@
1
+ """Entry point for ``python -m behave_trace``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from behave_trace.cli.app import main
8
+
9
+ if __name__ == "__main__":
10
+ sys.exit(main())