GeezerVison is showing github.com — test_workspacebuilder.py won't finish - no error message · Issue #620 · tmux-python/tmuxp
test_workspacebuilder.py won't finish - no error message #620DescriptionStep 1: Provide a summary of your problem
I was trying to run the tests with make test and the workspacebuilder_test seems to run endlessly (did have it running for more than 10 minutes, 2 times) before exiting with C-c.
Sorry if that is a bit too unspecific but I am not that expierienced with tests. So I'll gladly take advice. The reason for running the tests is that I am working on an issue / feature request.
Edit: okay I narrowed it down to the def pane_order_test(). I marked it to be skipped. All other tests pass.
Edit2: I narrowed it down further: the while loop in the test, at least for me, leads to an infinite loop because the breaking condition of if p.current_path == pane_path is never met, it always compares /usr/bin vs. /usr/sbin.
Step 2: Provide tmuxp details
- Python version 3.8.3
- system PATH
- tmux version 3.1b
- tmuxp version 1.5.5
- tmux path
- tmuxp path home/arkedos/Documents/git/tmuxp-dev/bin/tmuxp (virtualenv)
- libtmux version 0.8.2
- shell - zsh
Step 3: Describe your environment
- Architecture: x86_64
- OS version: Manjaro Linux 20.2 Kernel 5.8 RC
Step 4: Describe the problem:
Steps to reproduce:
- run
make test
- wait...
- hit C-c to exit after 10+ Minutes
Observed Results:
- What happened? This could be a description, log output, etc.
Not sure what to provide here since I am not that expierenced with tests. So advice is needed.
Expected Results:
- What did you expect to happen?
To finish all tests.
Relevant Code:
Did not make changes to testing code. Activitychanged the title [-]workspace_builder test[/-] [+]workspacebuilder_test won't finish - no error message[/+] on Aug 2, 2020changed the title [-]workspacebuilder_test won't finish - no error message[/-] [+]test_workspacebuilder.py won't finish - no error message[/+] on Aug 2, 2020jerri commented on Apr 29, 2021 I am not sure if I have the same problem, but I could reproduce and analyse the problem to be connected to the test test_automatic_rename_option. I am executing the tests on my mac. The test checks for the name sh for the window. But for some reasons executing sh leads to a window name of bash. At least in my case. This leads to the check to run forever(?), although the retry()-check should, as far as I understood, prevent the test to stay in an endless loop. But there we are.
Unfortunately I am not quite sure why it is happening and therefore don't have a good idea how to fix it. One probably would have to change the test to instead of using sh, maybe should use a different shell-command (e.g. top which is also used in other tests, I saw). Maybe this would correct the problem. But I have to admit, I don't fully understand the test, as I don't fully understand what feature the rename-option actually provides.
I still hope this little analysis helps to fix the test. Avimitin commented on Apr 19, 2022 This bug still exist. I am running the test in QEMU environment with 1.10.1 version, and it still running in infinite loop. This is because the tmux windows in QEMU output the qemu executable name.
I write some print statement in the test, this is the variable w.name output.

And it cause the infinite loop.

tony commented on Apr 19, 2022 Perhaps if test_automatic_rename_option were skipped or we added a max retry to it. tony commented on Apr 19, 2022 @avimtin @jerri @aRkedos
Is there a common denominator between your 3 cases, maybe?
- Your platform (if not otherwise stated)
which sh
man sh
sh -h
sh --help
It is looking like the sh command may not be reliable for window naming. added a commit that references this issue on May 21, 2022This issue will close once commit 4435de4 is merged into the 'master' branch.4435de4 tony commented on May 21, 2022 Avimitin commented on May 26, 2022 It seems like the libtmux module doesn't have return_until yet:
E ImportError: cannot import name 'retry_until' from 'libtmux.test' (/usr/lib/python3.10/site-packages/libtmux/test.py)
I am using python-libtmux 0.11.0. tony commented on May 26, 2022 @Avimitin What version of tmuxp do you have? pip show tmuxp
What command are you running? Avimitin commented on May 27, 2022 I am using the pre-release 1.12.0a5 version. And this error was prompt up when I was running pytest -vv -k "not test_pane_order" command. categulario commented on May 27, 2022 @tony just for the record. I am still experiencing this. The issue should not be closed. The symptoms are the same, the comparison /usr/bin == /usr/sbin never becomes true and it times out.
Of course the difference now is that a proper WaitTimeout error raised. categulario commented on May 27, 2022 Ok, I just debugged the problem with this test. Maybe @Avimitin can confirm. In my computer /usr/sbin is just an alias for /usr/bin. I guess the way pane.current_path is calculated resolves the real path in the filesystem, thus causing the error. Since the test is only testing for the names of the paths (the rest of them being correctly set) I propose to just use a path that is less likely to be an alias. Sending PR now added a commit that references this issue on May 27, 2022This issue will close once commit e5ac2b5 is merged into the 'master' branch.e5ac2b5 tony commented on May 27, 2022
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|