Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ dev = [
"pytest-rerunfailures",
"pytest-mock",
"pytest-watcher",
"libvt[pytest,syrupy]>=0.0.1a7,<0.1; python_version >= '3.12'",
"syrupy>=7.0.3; python_version >= '3.12'",
# Coverage
"codecov",
"coverage",
Expand Down Expand Up @@ -103,6 +105,8 @@ testing = [
"pytest-rerunfailures",
"pytest-mock",
"pytest-watcher",
"libvt[pytest,syrupy]>=0.0.1a7,<0.1; python_version >= '3.12'",
"syrupy>=7.0.3; python_version >= '3.12'",
]
coverage =[
"codecov",
Expand Down Expand Up @@ -142,6 +146,7 @@ gp-libs = false
gp-furo-theme = false
gp-sphinx = false
libtmux = false
libvt = false
sphinx-autodoc-api-style = false
sphinx-autodoc-argparse = false
sphinx-autodoc-docutils = false
Expand Down Expand Up @@ -188,6 +193,10 @@ exclude_lines = [
[tool.ty.environment]
python-version = "3.11"

[tool.ty.analysis]
# libvt and syrupy are Python 3.12+ test dependencies, absent in Python 3.11 environments
allowed-unresolved-imports = ["libvt", "libvt.**", "syrupy", "syrupy.**"]

[tool.ty.src]
include = ["src", "tests", "docs", ".github/scripts", "conftest.py"]

Expand Down
230 changes: 230 additions & 0 deletions tests/__snapshots__/test_vt_snapshots.ambr
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
# serializer version: 1
# name: test_cli_load_failure_recovery_prompt_pty[48-narrow][load_error_killed_narrow]
size=48x10 cursor=(4,0,vis=True) alt=False modes=[]
┌────────────────────────────────────────────────┐
│[Error] Database port 5432 unreachable │
│Error loading workspace. (k)ill, (a)ttach, (d)et│W
│ach? - (k, a, d) [k]: k │
│Session killed. │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────┘
styles:
r0[0..7]: fg=red
r1[0..24]: fg=red
r2[7..16]: fg=blue
r2[17..20]: fg=cyan
r3[0..15]: fg=blue
# ---
# name: test_cli_load_failure_recovery_prompt_pty[48-narrow][load_error_prompt_narrow]
size=48x10 cursor=(2,22,vis=True) alt=False modes=[]
┌────────────────────────────────────────────────┐
│[Error] Database port 5432 unreachable │
│Error loading workspace. (k)ill, (a)ttach, (d)et│W
│ach? - (k, a, d) [k]: │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────┘
styles:
r0[0..7]: fg=red
r1[0..24]: fg=red
r2[7..16]: fg=blue
r2[17..20]: fg=cyan
# ---
# name: test_cli_load_failure_recovery_prompt_pty[76-normal][load_error_killed_normal]
size=76x10 cursor=(3,0,vis=True) alt=False modes=[]
┌────────────────────────────────────────────────────────────────────────────┐
│[Error] Database port 5432 unreachable │
│Error loading workspace. (k)ill, (a)ttach, (d)etach? - (k, a, d) [k]: k │
│Session killed. │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────┘
styles:
r0[0..7]: fg=red
r1[0..24]: fg=red
r1[55..64]: fg=blue
r1[65..68]: fg=cyan
r2[0..15]: fg=blue
# ---
# name: test_cli_load_failure_recovery_prompt_pty[76-normal][load_error_prompt_normal]
size=76x10 cursor=(1,70,vis=True) alt=False modes=[]
┌────────────────────────────────────────────────────────────────────────────┐
│[Error] Database port 5432 unreachable │
│Error loading workspace. (k)ill, (a)ttach, (d)etach? - (k, a, d) [k]: │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────┘
styles:
r0[0..7]: fg=red
r1[0..24]: fg=red
r1[55..64]: fg=blue
r1[65..68]: fg=cyan
# ---
# name: test_cli_load_success_with_hook_output_pty[48-narrow][load_done_narrow]
size=48x10 cursor=(3,0,vis=True) alt=False modes=[]
┌────────────────────────────────────────────────┐
│✓ Loaded workspace: ok-48 (~/.tmuxp/app.yaml) [2│W
│ win, 3 panes] │
│Session created in detached state. │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────┘
styles:
r0[0..1]: fg=green
r0[20..25]: bold fg=magenta
r0[27..44]: fg=cyan
r0[46..48]: fg=blue
r1[0..14]: fg=blue
r2[0..34]: fg=cyan
# ---
# name: test_cli_load_success_with_hook_output_pty[48-narrow][load_mid_narrow]
size=48x10 cursor=(2,47,vis=False) alt=False modes=[]
┌────────────────────────────────────────────────┐
│hook: checking dependencies │
│hook: migrations ready │
│⠋ Loading workspace: ok-48 █████░░░░░ 2/2 wi... │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────┘
styles:
r2[0..1]: fg=cyan
r2[21..26]: bold fg=magenta
r2[27..32]: fg=green
r2[32..37]: fg=blue
# ---
# name: test_cli_load_success_with_hook_output_pty[76-normal][load_done_normal]
size=76x10 cursor=(2,0,vis=True) alt=False modes=[]
┌────────────────────────────────────────────────────────────────────────────┐
│✓ Loaded workspace: ok-76 (~/.tmuxp/app.yaml) [2 win, 3 panes] │
│Session created in detached state. │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────┘
styles:
r0[0..1]: fg=green
r0[20..25]: bold fg=magenta
r0[27..44]: fg=cyan
r0[46..62]: fg=blue
r1[0..34]: fg=cyan
# ---
# name: test_cli_load_success_with_hook_output_pty[76-normal][load_mid_normal]
size=76x10 cursor=(2,52,vis=False) alt=False modes=[]
┌────────────────────────────────────────────────────────────────────────────┐
│hook: checking dependencies │
│hook: migrations ready │
│⠋ Loading workspace: ok-76 █████░░░░░ 2/2 win worker │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────┘
styles:
r2[0..1]: fg=cyan
r2[21..26]: bold fg=magenta
r2[27..32]: fg=green
r2[32..37]: fg=blue
# ---
# name: test_cli_spinner_panel_and_success_vt_snapshots[spinner_after_success]
size=64x6 cursor=(1,0,vis=True) alt=False modes=[LNM]
┌────────────────────────────────────────────────────────────────┐
│✓ Loaded workspace: demo (~/.tmuxp/demo.yaml) [2 win, 3 panes] │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────┘
styles:
r0[0..1]: fg=green
r0[20..24]: bold fg=magenta
r0[26..44]: fg=cyan
r0[46..62]: fg=blue
# ---
# name: test_cli_spinner_panel_and_success_vt_snapshots[spinner_cleanup_delta]
header: size=64x6 cursor=(2,51,vis=False) alt=False modes=[LNM] -> size=64x6 cursor=(1,0,vis=True) alt=False modes=[LNM]
row 0 cols 0..62: 'hook: checking dependencies ' -> '✓ Loaded workspace: demo (~/.tmuxp/demo.yaml) [2 win, 3 panes]'
row 1 cols 0..27: 'hook: migrations up to date' -> ' '
row 2 cols 0..51: '⠋ Loading workspace: demo █████░░░░░ 2/2 win worker' -> ' '
styles: r2[0..1]: fg=cyan, r2[21..25]: bold fg=magenta, r2[26..31]: fg=green (+1 more) -> r0[0..1]: fg=green, r0[20..24]: bold fg=magenta, r0[26..44]: fg=cyan (+1 more)
- size=64x6 cursor=(2,51,vis=False) alt=False modes=[LNM]
+ size=64x6 cursor=(1,0,vis=True) alt=False modes=[LNM]
┌────────────────────────────────────────────────────────────────┐
- │hook: checking dependencies │
+ │✓ Loaded workspace: demo (~/.tmuxp/demo.yaml) [2 win, 3 panes] │
│^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^ ^ ^^^^^^ │
- │hook: migrations up to date │
+ │ │
│^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^ │
- │⠋ Loading workspace: demo █████░░░░░ 2/2 win worker │
+ │ │
│^ ^^^^^^^ ^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^ ^^^ ^^^^^^ │
│ │
│ │
...
└────────────────────────────────────────────────────────────────┘
styles:
- r2[0..1]: fg=cyan
- r2[21..25]: bold fg=magenta
- r2[26..31]: fg=green
+ r0[0..1]: fg=green
+ r0[20..24]: bold fg=magenta
+ r0[26..44]: fg=cyan
- r2[31..36]: fg=blue
+ r0[46..62]: fg=blue
# ---
# name: test_cli_spinner_panel_and_success_vt_snapshots[spinner_mid_build]
size=64x6 cursor=(2,51,vis=False) alt=False modes=[LNM]
┌────────────────────────────────────────────────────────────────┐
│hook: checking dependencies │
│hook: migrations up to date │
│⠋ Loading workspace: demo █████░░░░░ 2/2 win worker │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────┘
styles:
r2[0..1]: fg=cyan
r2[21..25]: bold fg=magenta
r2[26..31]: fg=green
r2[31..36]: fg=blue
# ---
Loading
Loading