Skip to content

Commit

Permalink
Update test according to change.
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Jan 28, 2024
1 parent f2a21af commit a261343
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ def test_full_circle(mock_popen):
show_layouts: true
windows:
- name: foo
- name: foobar
if: show_layouts
commands:
- echo "${replacement_param}"
- name: bar
- name: hello
layout: tiled
delay: 1
splits:
Expand All @@ -71,23 +71,23 @@ def test_full_circle(mock_popen):
- echo "second_split"
"""
server_name = "my_server"
session_name = "my_session"
session_name = "foo"
session = Session(server_name=server_name, session_name=session_name)
session.init_from_yaml(yaml.safe_load(CONFIG))

session.run(debug=True)
calls = [
["rename-window", "-t", "my_session:$", "foo"],
["send-keys", "-t", "my_session:foo", 'echo "hello"', "C-m"],
["send-keys", "-t", "my_session:foo", 'echo "world"', "C-m"],
["send-keys", "-t", "my_session:foo", 'echo "schubidoo"', "C-m"],
["select-window", "-t", "my_session:foobar"],
["new-window", "-t", "my_session"],
["rename-window", "-t", "my_session:$", "bar"],
["send-keys", "-t", "my_session:bar", 'echo "first_split"', "C-m"],
["split-window", "-t", "my_session:bar"],
["send-keys", "-t", "my_session:bar", 'echo "second_split"', "C-m"],
["select-layout", "-t", "my_session:bar", "tiled"],
["rename-window", "-t", "foo:$", "foobar"],
["send-keys", "-t", "foo:foobar", 'echo "hello"', "C-m"],
["send-keys", "-t", "foo:foobar", 'echo "world"', "C-m"],
["send-keys", "-t", "foo:foobar", 'echo "schubidoo"', "C-m"],
["select-window", "-t", "foo:foobar"],
["new-window", "-t", "foo:"],
["rename-window", "-t", "foo:$", "hello"],
["send-keys", "-t", "foo:hello", 'echo "first_split"', "C-m"],
["split-window", "-t", "foo:hello"],
["send-keys", "-t", "foo:hello", 'echo "second_split"', "C-m"],
["select-layout", "-t", "foo:hello", "tiled"],
]
for call in calls:
mock_popen.assert_any_call(["tmux", "-L", server_name] + call)

0 comments on commit a261343

Please sign in to comment.