Tests failing on aarch64
johanneskastl opened this issue · 2 comments
johanneskastl commented
I am packaging libtmux for openSUSE. Unfortunately the tests fail on aarch64.
The builds are currently blocked, so I need to give the exact error messages later.
However, these tests are failing and thus currently excluded in the pytest invocation:
%pytest -k not '(test_split_window_with_environment[environment1] or \
test_function_times_out or \
test_function_times_out_no_rise \
or test_select_window \
or test_capture_pane_start \
or test_select_window)'
johanneskastl commented
[ 107s] ___________________ test_function_times_out_no_raise_assert ____________________
[ 107s]
[ 107s] def test_function_times_out_no_raise_assert() -> None:
[ 107s] ini = time()
[ 107s]
[ 107s] def never_true() -> bool:
[ 107s] return False
[ 107s]
[ 107s] assert not retry_until(never_true, 1, raises=False)
[ 107s]
[ 107s] end = time()
[ 107s]
[ 107s] > assert abs((end - ini) - 1.0) < 0.01
[ 107s] E assert 0.012582540512084961 < 0.01
[ 107s] E + where 0.012582540512084961 = abs(((1679626883.2940586 - 1679626882.281476) - 1.0))
[ 107s]
[ 107s] tests/legacy_api/test_test.py:67: AssertionError
[ 107s] =============================== warnings summary ===============================
johanneskastl commented
Another one:
[ 64s] =================================== FAILURES ===================================
[ 64s] ________________ test_new_window_with_environment[environment1] ________________
[ 64s]
[ 64s] session = Session($1 libtmux_n15t2um4)
[ 64s] environment = {'ENV_VAR_1': 'window_1', 'ENV_VAR_2': 'window_2'}
[ 64s]
[ 64s] @pytest.mark.skipif(
[ 64s] has_lt_version("3.0"),
[ 64s] reason="needs -e flag for new-window which was introduced in 3.0",
[ 64s] )
[ 64s] @pytest.mark.parametrize(
[ 64s] "environment",
[ 64s] [
[ 64s] {"ENV_VAR": "window"},
[ 64s] {"ENV_VAR_1": "window_1", "ENV_VAR_2": "window_2"},
[ 64s] ],
[ 64s] )
[ 64s] def test_new_window_with_environment(
[ 64s] session: Session,
[ 64s] environment: t.Dict[str, str],
[ 64s] ) -> None:
[ 64s] env = shutil.which("env")
[ 64s] assert env is not None, "Cannot find usable `env` in PATH."
[ 64s]
[ 64s] window = session.new_window(
[ 64s] attach=True,
[ 64s] window_name="window_with_environment",
[ 64s] window_shell=f"{env} PS1='$ ' sh",
[ 64s] environment=environment,
[ 64s] )
[ 64s] pane = window.attached_pane
[ 64s] assert pane is not None
[ 64s] for k, v in environment.items():
[ 64s] pane.send_keys(f"echo ${k}")
[ 64s] > assert pane.capture_pane()[-2] == v
[ 64s] E IndexError: list index out of range
[ 64s]
[ 64s] tests/legacy_api/test_session.py:291: IndexError
[ 64s] =============================== warnings summary ===============================