Comments (6)
The first step IMO would be to expand the tox matrix to include more versions of Click, esp 6.7 which is the version available on Leap 15.1
from click-aliases.
The first step IMO would be to expand the tox matrix to include more versions of Click, esp 6.7 which is the version available on Leap 15.1
Sounds like the right next steps. I can do something tomorrow, but could review PRs if you'd like to work on it in the meantime.
from click-aliases.
click 6.7 is the version installed in Travis, and that doesnt seem to be the issue, as it works correctly with click 3.3+
The patch in https://build.opensuse.org/package/show/openSUSE:Leap:15.1/python-click looks concerning as it is disabling at test which looks very much like the above; same also in Leap 15.2 at
https://build.opensuse.org/package/view_file/openSUSE:Leap:15.2/python-click/python-click-test_compat.py.patch?expand=1
That suggests the test logic in click-aliases might be quite old, and the fix may be to update the test code a bit, if that doesnt break too many old versions of click.
from click-aliases.
where is this patch coming from? From the openSUSE packaging? what happens without this patch applied?
The question still remains: why is it running on my/your local machine, on travis but not on your openSUSE?
What exact Python Version, click Version has this openSUSE environment?
from click-aliases.
Trying to package this project for Arch Linux with Python 3.11 and click > 8, I am also running into this:
============================= test session starts ==============================
platform linux -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-click-aliases/src/click-aliases-1.0.1
collecting ... collected 9 items
tests/test_basic.py::test_help PASSED [ 11%]
tests/test_basic.py::test_foobar PASSED [ 22%]
tests/test_basic.py::test_invalid FAILED [ 33%]
tests/test_foobar.py::test_help PASSED [ 44%]
tests/test_foobar.py::test_foobar PASSED [ 55%]
tests/test_foobar.py::test_invalid FAILED [ 66%]
tests/test_naval.py::test_cli PASSED [ 77%]
tests/test_naval.py::test_ship_help PASSED [ 88%]
tests/test_naval.py::test_ship_move PASSED [100%]
=================================== FAILURES ===================================
_________________________________ test_invalid _________________________________
runner = <click.testing.CliRunner object at 0x7f8c5ddf2650>
def test_invalid(runner):
result = runner.invoke(cli, ['bar'])
> assert result.output == TEST_INVALID
E assert "Usage: cli [OPTIONS] COMMAND [ARGS]...\nTry 'cli --help' for help.\n\nError: No such command 'bar'.\n" == 'Usage: cli [OPTIONS] COMMAND [ARGS]...\nTry "cli --help" for help.\n\nError: No such command "bar".\n'
E Usage: cli [OPTIONS] COMMAND [ARGS]...
E - Try "cli --help" for help.
E ? ^ ^
E + Try 'cli --help' for help.
E ? ^ ^
E
E - Error: No such command "bar".
E ? ^ ^
E + Error: No such command 'bar'.
E ? ^ ^
tests/test_basic.py:52: AssertionError
_________________________________ test_invalid _________________________________
runner = <click.testing.CliRunner object at 0x7f8c5cfe8c90>
def test_invalid(runner):
result = runner.invoke(cli, ['baz'])
> assert result.output == TEST_INVALID
E assert "Usage: cli [OPTIONS] COMMAND [ARGS]...\nTry 'cli --help' for help.\n\nError: No such command 'baz'.\n" == 'Usage: cli [OPTIONS] COMMAND [ARGS]...\nTry "cli --help" for help.\n\nError: No such command "baz".\n'
E Usage: cli [OPTIONS] COMMAND [ARGS]...
E - Try "cli --help" for help.
E ? ^ ^
E + Try 'cli --help' for help.
E ? ^ ^
E
E - Error: No such command "baz".
E ? ^ ^
E + Error: No such command 'baz'.
E ? ^ ^
tests/test_foobar.py:53: AssertionError
=========================== short test summary info ============================
FAILED tests/test_basic.py::test_invalid - assert "Usage: cli [OPTIONS] COMMA...
FAILED tests/test_foobar.py::test_invalid - assert "Usage: cli [OPTIONS] COMM...
========================= 2 failed, 7 passed in 0.04s ==========================
In case this is already fixed, can a new release please be made?
from click-aliases.
using click 8.1.3 under Fedora, the tests fails with:
+ /usr/bin/python3 -m tox --current-env -q --recreate -e py311
============================= test session starts ==============================
platform linux -- Python 3.11.3, pytest-7.1.3, pluggy-1.0.0
cachedir: .tox/py311/.pytest_cache
rootdir: /builddir/build/BUILD/click-aliases-1.0.1
collected 9 items
tests/test_basic.py ..F [ 33%]
tests/test_foobar.py ..F [ 66%]
tests/test_naval.py ... [100%]
=================================== FAILURES ===================================
_________________________________ test_invalid _________________________________
runner = <click.testing.CliRunner object at 0x7f5a53030f50>
def test_invalid(runner):
result = runner.invoke(cli, ['bar'])
> assert result.output == TEST_INVALID
E assert "Usage: cli [...mand 'bar'.\n" == 'Usage: cli [...mand "bar".\n'
E Skipping 33 identical leading characters in diff, use -v to show
E S]...
E - Try "cli --help" for help.
E ? ^ ^
E + Try 'cli --help' for help.
E ? ^ ^
E ...
E
E ...Full output truncated (5 lines hidden), use '-vv' to show
tests/test_basic.py:52: AssertionError
_________________________________ test_invalid _________________________________
runner = <click.testing.CliRunner object at 0x7f5a52eaa150>
def test_invalid(runner):
result = runner.invoke(cli, ['baz'])
> assert result.output == TEST_INVALID
E assert "Usage: cli [...mand 'baz'.\n" == 'Usage: cli [...mand "baz".\n'
E Skipping 33 identical leading characters in diff, use -v to show
E S]...
E - Try "cli --help" for help.
E ? ^ ^
E + Try 'cli --help' for help.
E ? ^ ^
E ...
E
E ...Full output truncated (5 lines hidden), use '-vv' to show
tests/test_foobar.py:53: AssertionError
=========================== short test summary info ============================
FAILED tests/test_basic.py::test_invalid - assert "Usage: cli [...mand 'bar'....
FAILED tests/test_foobar.py::test_invalid - assert "Usage: cli [...mand 'baz'...
========================= 2 failed, 7 passed in 0.07s ==========================
ERROR: InvocationError for command /usr/bin/py.test (exited with code 1)
___________________________________ summary ____________________________________
ERROR: py311: commands failed
from click-aliases.
Related Issues (4)
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 click-aliases.