Comments (3)
And another one:
[ 81s] =================================== FAILURES ===================================
[ 81s] ______________________________ test_select_window ______________________________
[ 81s]
[ 81s] session = Session($1 libtmux_7ruy1pqh)
[ 81s]
[ 81s] def test_select_window(session: Session) -> None:
[ 81s] """Session.select_window moves window."""
[ 81s] # get the current window_base_index, since different user tmux config
[ 81s] # may start at 0 or 1, or whatever they want.
[ 81s] window_idx = session.attached_window.window_index
[ 81s] assert window_idx is not None
[ 81s] window_base_index = int(window_idx)
[ 81s]
[ 81s] session.new_window(window_name="test_window")
[ 81s] window_count = len(session.windows)
[ 81s]
[ 81s] assert window_count >= 2 # 2 or more windows
[ 81s]
[ 81s] assert len(session.windows) == window_count
[ 81s]
[ 81s] # tmux selects a window, moves to it, shows it as attached_window
[ 81s] selected_window1 = session.select_window(window_base_index)
[ 81s] assert isinstance(selected_window1, Window)
[ 81s] attached_window1 = session.attached_window
[ 81s]
[ 81s] assert selected_window1 == attached_window1
[ 81s] > assert selected_window1.__dict__ == attached_window1.__dict__
[ 81s] E AssertionError: assert {'active_wind...e': None, ...} == {'active_wind...e': None, ...}
[ 81s] E Omitting 120 identical items, use -vv to show
[ 81s] E Differing items:
[ 81s] E {'cursor_x': '0'} != {'cursor_x': '62'}
[ 81s] E {'history_bytes': '576'} != {'history_bytes': '976'}
[ 81s] E Full diff:
[ 81s] E {
[ 81s] E 'active_window_index': '1',...
[ 81s] E
[ 81s] E ...Full output truncated (129 lines hidden), use '-vv' to show
[ 81s]
[ 81s] tests/test_session.py:51: AssertionError
[ 81s] =============================== warnings summary ===============================
[...]
from libtmux.
And two more:
[ 79s] =================================== FAILURES ===================================
[ 79s] ___________________________ test_function_times_out ____________________________
[ 79s]
[ 79s] def test_function_times_out() -> None:
[ 79s] ini = time()
[ 79s]
[ 79s] def never_true() -> bool:
[ 79s] return False
[ 79s]
[ 79s] with pytest.raises(WaitTimeout):
[ 79s] retry_until(never_true, 1)
[ 79s]
[ 79s] end = time()
[ 79s]
[ 79s] > assert abs((end - ini) - 1.0) < 0.01
[ 79s] E assert 0.010026931762695312 < 0.01
[ 79s] E + where 0.010026931762695312 = abs(((1679552160.754546 - 1679552159.744519) - 1.0))
[ 79s]
[ 79s] tests/legacy_api/test_test.py:41: AssertionError
[ 79s] _______________________ test_function_times_out_no_rise ________________________
[ 79s]
[ 79s] def test_function_times_out_no_rise() -> None:
[ 79s] ini = time()
[ 79s]
[ 79s] def never_true() -> bool:
[ 79s] return False
[ 79s]
[ 79s] retry_until(never_true, 1, raises=False)
[ 79s]
[ 79s] end = time()
[ 79s]
[ 79s] > assert abs((end - ini) - 1.0) < 0.01
[ 79s] E assert 0.016624927520751953 < 0.01
[ 79s] E + where 0.016624927520751953 = abs(((1679552161.8158545 - 1679552160.7992296) - 1.0))
[ 79s]
[ 79s] tests/legacy_api/test_test.py:54: AssertionError
[ 79s] =============================== warnings summary ===============================
from libtmux.
And the next one:
[ 84s] =================================== FAILURES ===================================
[ 84s] ________________ test_new_window_with_environment[environment0] ________________
[ 84s]
[ 84s] session = Session($1 libtmux_x82y4wzk), environment = {'ENV_VAR': 'window'}
[ 84s]
[ 84s] @pytest.mark.skipif(
[ 84s] has_lt_version("3.0"),
[ 84s] reason="needs -e flag for new-window which was introduced in 3.0",
[ 84s] )
[ 84s] @pytest.mark.parametrize(
[ 84s] "environment",
[ 84s] [
[ 84s] {"ENV_VAR": "window"},
[ 84s] {"ENV_VAR_1": "window_1", "ENV_VAR_2": "window_2"},
[ 84s] ],
[ 84s] )
[ 84s] def test_new_window_with_environment(
[ 84s] session: Session,
[ 84s] environment: t.Dict[str, str],
[ 84s] ) -> None:
[ 84s] env = shutil.which("env")
[ 84s] assert env is not None, "Cannot find usable `env` in PATH."
[ 84s]
[ 84s] window = session.new_window(
[ 84s] attach=True,
[ 84s] window_name="window_with_environment",
[ 84s] window_shell=f"{env} PS1='$ ' sh",
[ 84s] environment=environment,
[ 84s] )
[ 84s] pane = window.attached_pane
[ 84s] assert pane is not None
[ 84s] for k, v in environment.items():
[ 84s] pane.send_keys(f"echo ${k}")
[ 84s] > assert pane.capture_pane()[-2] == v
[ 84s] E IndexError: list index out of range
[ 84s]
[ 84s] tests/legacy_api/test_session.py:291: IndexError
[ 84s] =============================== warnings summary ===============================
from libtmux.
Related Issues (20)
- Intermittent errors with tests on x86_64 / amd64 HOT 7
- Intermittent errors with tests on i586 (32bit)
- Is there any way to connect to a tmux session on a remote machine? HOT 1
- Intermittent / flaky test test_capture_pane
- select_pane not working correctly with multiple sessions HOT 2
- Drop Python 3.7 HOT 1
- `build(build-system)`: Remove `setuptools` build dependency
- unknown pytest option --doctest-docutils-modules HOT 7
- Unable to access server via WSGI HOT 4
- `TmuxObjectDoesNotExist` when creating `libtmux.Server().new_session(attach=True)` HOT 13
- Remove assert from __eq__ for windows HOT 5
- Tests failing with "FileNotFoundError: [Errno 2]" and "Unknown directive type: 'currentmodule' [myst.directive_unknown]" HOT 6
- Tests: Snapshots
- Options: Typed structures
- Environment: Add to `new-window`, `split-window`, `respawn-window`, `respawn-pane`
- No implicit exports from __init__.py HOT 1
- `pane.send_keys()` doesn't send cmd to correct pane when cmd has a `-t` flag HOT 3
- QueryList exception do not inherit from libtmux.exc.LibTmuxException
- How to enter "Esc" when editing file in vim with libtmux?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libtmux.