mirror of https://github.com/tqdm/tqdm.git
fix deps & tests
This commit is contained in:
parent
3ad2549adc
commit
6c930f5d84
|
@ -77,6 +77,7 @@ setup_requires=setuptools>=42; setuptools_scm[toml]>=3.4
|
|||
python_requires=>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
|
||||
install_requires=
|
||||
colorama; platform_system == 'Windows'
|
||||
importlib_resources; python_version < "3.7"
|
||||
tests_require=tox
|
||||
include_package_data=True
|
||||
packages=find:
|
||||
|
|
|
@ -1987,9 +1987,9 @@ def test_reversed(capsys):
|
|||
|
||||
def test_contains(capsys):
|
||||
"""Test __contains__ doesn't iterate"""
|
||||
with tqdm(_range(9)) as t:
|
||||
with tqdm(list(range(9))) as t:
|
||||
assert 9 not in t
|
||||
assert all(i in t for i in range(9))
|
||||
assert all(i in t for i in _range(9))
|
||||
out, err = capsys.readouterr()
|
||||
assert not out
|
||||
assert ' 0%' in err
|
||||
|
|
|
@ -245,15 +245,15 @@ Options:
|
|||
if manpath or comppath:
|
||||
from os import path
|
||||
from shutil import copyfile
|
||||
try:
|
||||
from importlib import resources
|
||||
except ImportError: # py<3.9
|
||||
try: # py<3.7
|
||||
import importlib_resources as resources
|
||||
except ImportError:
|
||||
from importlib import resources
|
||||
|
||||
def cp(name, dst):
|
||||
"""copy resource `name` to `dst`"""
|
||||
with resources.path('tqdm', name) as src:
|
||||
copyfile(src, dst)
|
||||
copyfile(str(src), dst)
|
||||
log.info("written:%s", dst)
|
||||
if manpath is not None:
|
||||
cp('tqdm.1', path.join(manpath, 'tqdm.1'))
|
||||
|
|
Loading…
Reference in New Issue