-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tests): explicitly state the shell to use #844
base: master
Are you sure you want to change the base?
fix(tests): explicitly state the shell to use #844
Conversation
Codecov Report
@@ Coverage Diff @@
## master #844 +/- ##
=======================================
Coverage 76.46% 76.46%
=======================================
Files 24 24
Lines 1606 1606
Branches 362 362
=======================================
Hits 1228 1228
Misses 269 269
Partials 109 109 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Perhaps it may be beneficial or necessary to set a Out of curiousity, without this, what error do you get? What distro / system are you running into an issue on? As for |
I'm on Arch, but I think the issue is my (login) shell: Running (on current master): There are two issues with fish for me:
I think, |
Thank you! I will look closer during the weekend. I'd like to get arch / perhaps freebsd setup locally Perhaps |
@zappolowski On a fresh Arch installation, I initially got a similar error. I don't have fish. But I think it's due to not having It started working after installing a few packages / configurations. Likely since the arch package for tmuxp installs tmux. $ sudo pacman -Qe
arch-install-scripts 27-1
base 3-1
dhcpcd 9.4.1-1
diffutils 3.8-1
git 2.38.1-2
groff 1.22.4-7
inetutils 2.3-1
keychain 2.8.5-2
logrotate 3.20.1-1
make 4.3-3
man-db 2.11.0-1
man-pages 6.01-1
nano 6.4-1
netctl 1.28-1
nodejs 19.0.1-1
openresolv 3.12.0-1
openssh 9.1p1-3
python 3.10.8-3
sudo 1.9.12-5
sysfsutils 2.1.1-1
texinfo 6.8-2
vcspull 1.18.0-1
vi 1:070224-6
vim 9.0.0814-1
which 2.21-5
yarn 1.22.19-1 I created a second user: |
e800c99
to
b1b3775
Compare
As I've said the culprit is not Arch, but my login-shell, which is I've created two (hopefully) portable containers to verify this (TBH it was a bit of a PITA to figure out, why the tests failed as man pages were missing): If you have $ podman run --rm --volume $(pwd):/src:ro localhost/arch-bash-tmuxp-dev:latest
$ podman run --rm --volume $(pwd):/src:ro localhost/arch-fish-tmuxp-dev:latest The first one should succeed, the second one should fail. Edit: Using the bash image I can locally run the test-suite without issues, which would be okay for me. It's up to you to decide whether it"s worth the effort of supporting "special" configurations like mine. Edit2: A note on running the containers. As |
This is the error I got with podman run --rm --interactive --tty --volume $(pwd):/src:rw localhost/arch-fish-tmuxp-dev:latest Installing the current project: libtmux (0.15.9)
============================================================================================================ test session starts ============================================================================================================collected 180 items
src/libtmux/pane.py .RRF [ 1%]
src/libtmux/pytest_plugin.py .. [ 2%]
src/libtmux/server.py .. [ 3%]
src/libtmux/session.py . [ 3%]
src/libtmux/test.py ...... [ 7%]
src/libtmux/window.py .. [ 8%]
tests/test_common.py .................... [ 19%]
tests/test_pane.py ..... [ 22%]
tests/test_pytest_plugin.py . [ 22%]
tests/test_server.py ............ [ 29%]
tests/test_session.py ......................... [ 43%]
tests/test_test.py ..... [ 46%]
tests/test_tmuxobject.py ..... [ 48%]
tests/test_window.py ....................... [ 61%]
docs/index.md ............. [ 68%]
docs/quickstart.md ..................... [ 80%]
docs/reference/properties.md ............. [ 87%]
docs/topics/traversal.md ......... [ 92%]
README.md ............. [100%]
================================================================================================================= FAILURES ==================================================================================================================___________________________________________________________________________________________________ [doctest] libtmux.pane.Pane.send_keys ___________________________________________________________________________________________________150 .. versionchanged:: 0.14
151
152 Default changed from True to False.
153 literal : bool, optional
154 Send keys literally, default True.
155
156 Examples
157 --------
158 >>> pane = window.split_window(shell='sh')
159 >>> pane.capture_pane()
Expected:
['$']
Got:
['sh-5.1$']
/src/src/libtmux/pane.py:159: DocTestFailure
============================================================================================================= warnings summary ==============================================================================================================../home/arch/.cache/pypoetry/virtualenvs/libtmux-VsnhxLU2-py3.10/lib/python3.10/site-packages/_pytest/cacheprovider.py:433
/home/arch/.cache/pypoetry/virtualenvs/libtmux-VsnhxLU2-py3.10/lib/python3.10/site-packages/_pytest/cacheprovider.py:433: PytestCacheWarning: cache could not write path /src/.pytest_cache/v/cache/nodeids
config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
../home/arch/.cache/pypoetry/virtualenvs/libtmux-VsnhxLU2-py3.10/lib/python3.10/site-packages/_pytest/cacheprovider.py:387
/home/arch/.cache/pypoetry/virtualenvs/libtmux-VsnhxLU2-py3.10/lib/python3.10/site-packages/_pytest/cacheprovider.py:387: PytestCacheWarning: cache could not write path /src/.pytest_cache/v/cache/lastfailed
config.cache.set("cache/lastfailed", self.lastfailed)
../home/arch/.cache/pypoetry/virtualenvs/libtmux-VsnhxLU2-py3.10/lib/python3.10/site-packages/_pytest/stepwise.py:52
/home/arch/.cache/pypoetry/virtualenvs/libtmux-VsnhxLU2-py3.10/lib/python3.10/site-packages/_pytest/stepwise.py:52: PytestCacheWarning: cache could not write path /src/.pytest_cache/v/cache/stepwise
session.config.cache.set(STEPWISE_CACHE_DIR, [])
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================== short test summary info ==========================================================================================================FAILED src/libtmux/pane.py::libtmux.pane.Pane.send_keys
============================================================================================ 1 failed, 179 passed, 3 warnings, 2 rerun in 42.16s ============================================================================================ |
You've run the tests on But yeah, that error I also get on |
b1b3775
to
e2b8600
Compare
I removed If you're in the PR's branches checked out: git pull --rebase --autostash |
Those |
Do you have a list of which tests you issues with when you use
|
Yes, these are the same tests failing for me. |
e2b8600
to
7aa4ca2
Compare
`tmux` uses the default login shell and thus tests might fail if this is not bash (or something compatible). Explicitly stating which shell to use circumvents issues arising from accidentally using another shell.
7aa4ca2
to
727ab39
Compare
1989584
to
b30a864
Compare
tmux
uses the default login shell and thus tests might fail if this is not bash (or something compatible). Explicitly stating which shell to use circumvents issues arising from accidentally using another shell.