Giter Club home page Giter Club logo

Comments (3)

johanneskastl avatar johanneskastl commented on June 20, 2024

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.

johanneskastl avatar johanneskastl commented on June 20, 2024

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.

johanneskastl avatar johanneskastl commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.