Skip to content

Commit

Permalink
MNT: bump required rich version to 10.13, adapt tests accordingly (no…
Browse files Browse the repository at this point in the history
… actual change in behaviour)
  • Loading branch information
neutrinoceros committed Nov 15, 2021
1 parent 24fb0e5 commit 48b5eba
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to

## [6.5.3] - 2021-11-15
## [6.5.5] - 2021-11-15

MNT: bump required rich version to 10.13, adapt tests accordingly (no actual change in behaviour)
[PR #144](https://github.com/neutrinoceros/wxc/pull/144)

## [6.5.4] - 2021-11-15

BUG: fix a crash when calling `wxc <pkg> --full` for packages for which no implemented method
to get the version tag works.
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = wxc
version = 6.5.4
version = 6.5.5
description = A CLI facility to inspect Python environments.
long_description = file: README.md
long_description_content_type = text/markdown
Expand All @@ -23,7 +23,7 @@ classifiers =
[options]
packages = find:
install_requires =
rich>=10.7.0
rich>=10.13.0
importlib-metadata;python_version < "3.8"
stdlib-list>=0.8;python_version < "3.10"
python_requires = >=3.7
Expand All @@ -39,13 +39,13 @@ console_scripts =

[options.extras_require]
dev =
numpy
pytest>=6.0.2
pytest-cov
pytest_mock>=3.5.1
schema>=0.7.2
toml
matplotlib_inline;python_version < "3.10"
numpy;python_version < "3.10"

[mypy]
python_version = 3.7
Expand Down
2 changes: 1 addition & 1 deletion tests/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_fail_builtins(name, capsys):
ret = main([name])

out, err = capsys.readouterr()
assert out == ""
assert out == "\n"
assert err == (
"ERROR failed to locate source data. "
f"{name!r} is a builtin object.\n"
Expand Down
15 changes: 8 additions & 7 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_falty_queries(capsys, arg):
res = main(argv)
assert res != 0
out, err = capsys.readouterr()
assert out == ""
assert out == "\n"
assert err == "ERROR no installed package with name 'NotARealPackage'\n"


Expand All @@ -58,7 +58,7 @@ def test_stdlib_typos_in_module_name(capsys):
res = main(["sis"])
assert res != 0
out, err = capsys.readouterr()
assert out == ""
assert out == "\n"
assert (
err
== "ERROR no installed package with name 'sis'. Did you mean 'sys' ?\n"
Expand All @@ -69,7 +69,7 @@ def test_non_existing_member(capsys):
ret = main(["pathlib.nothing"])
assert ret != 0
out, err = capsys.readouterr()
assert out == ""
assert out == "\n"
assert (
# not matching exact results since they are different between Python 3.9 and 3.10
err.startswith(
Expand All @@ -87,7 +87,7 @@ def test_compiled_source(capsys):
err
== "ERROR failed to locate source data. 'numpy.abs.at' is a C-compiled function.\n"
)
assert out == ""
assert out == "\n"
assert ret != 0


Expand All @@ -98,7 +98,7 @@ def test_typo1(capsys):
err
== "ERROR type object 'pathlib.Path' has no attribute 'chmode'. Did you mean 'chmod' ?\n"
)
assert out == ""
assert out == "\n"
assert ret != 0


Expand All @@ -109,7 +109,7 @@ def test_typo2(capsys):
err
== "ERROR type object 'pathlib.Path' has no attribute 'homme'. Did you mean 'home' ?\n"
)
assert out == ""
assert out == "\n"
assert ret != 0


Expand All @@ -125,6 +125,7 @@ def test_normalize_hyphen(capsys):
def test_source(fake_module, capsys):

expected = (
"""\n"""
""" 4 def import_me_if_you_can():\n"""
''' 5 """Docstrings are good. Use them."""\n'''
""" 6 return "Gotcha"\n"""
Expand All @@ -148,7 +149,7 @@ def test_source_error(capsys):

ret2 = main(["numpy.VisibleDeprecationWarning", "-s"])
out, err = capsys.readouterr()
assert out == ""
assert out == "\n"
assert err == "ERROR could not find class definition\n"
assert ret2 != 0

Expand Down
2 changes: 1 addition & 1 deletion tests/test_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_get_data_builtin(name):
def test_cli_builtin(name, capsys):
ret = main([name])
out, err = capsys.readouterr()
assert out == ""
assert out == "\n"
assert (
err
== f"ERROR failed to locate source data. {name!r} is a C-compiled function.\n"
Expand Down
2 changes: 1 addition & 1 deletion wxc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "6.5.4"
__version__ = "6.5.5"

0 comments on commit 48b5eba

Please sign in to comment.