Skip to content
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

0.12.0: pytest is failing in bench/test_wordcount.py::test_shakespeare unit because missing bench/shakespeare.txt file #564

Open
kloczek opened this issue Mar 20, 2023 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Mar 20, 2023

Looks like something is wrong with test suite and pytest is failing on missimg file
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-toolz-0.12.0-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-toolz-0.12.0-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/toolz-0.12.0
collected 204 items

bench/test_curry.py .                                                    [  0%]
bench/test_curry_baseline.py .                                           [  0%]
bench/test_first.py ..                                                   [  1%]
bench/test_first_iter.py ..                                              [  2%]
bench/test_frequencies.py ..                                             [  3%]
bench/test_get.py .                                                      [  4%]
bench/test_get_list.py .                                                 [  4%]
bench/test_groupby.py .                                                  [  5%]
bench/test_join.py ...                                                   [  6%]
bench/test_memoize.py .                                                  [  7%]
bench/test_memoize_kwargs.py .                                           [  7%]
bench/test_pluck.py .                                                    [  8%]
bench/test_sliding_window.py .                                           [  8%]
bench/test_wordcount.py F                                                [  9%]
toolz/sandbox/tests/test_core.py ....                                    [ 11%]
toolz/sandbox/tests/test_parallel.py .                                   [ 11%]
toolz/tests/test_compatibility.py .                                      [ 12%]
toolz/tests/test_curried.py ..........                                   [ 17%]
toolz/tests/test_curried_doctests.py .                                   [ 17%]
toolz/tests/test_dicttoolz.py .......................................... [ 38%]
.....                                                                    [ 40%]
toolz/tests/test_functoolz.py ......................................     [ 59%]
toolz/tests/test_inspect_args.py .................                       [ 67%]
toolz/tests/test_itertoolz.py .......................................... [ 88%]
........                                                                 [ 92%]
toolz/tests/test_recipes.py ..                                           [ 93%]
toolz/tests/test_serialization.py .........                              [ 97%]
toolz/tests/test_signatures.py ...                                       [ 99%]
toolz/tests/test_tlz.py .                                                [ 99%]
toolz/tests/test_utils.py .                                              [100%]

=================================== FAILURES ===================================
_______________________________ test_shakespeare _______________________________

    def test_shakespeare():
>       with open('bench/shakespeare.txt') as f:
E       FileNotFoundError: [Errno 2] No such file or directory: 'bench/shakespeare.txt'

bench/test_wordcount.py:17: FileNotFoundError
=========================== short test summary info ============================
FAILED bench/test_wordcount.py::test_shakespeare - FileNotFoundError: [Errno ...
======================== 1 failed, 203 passed in 5.34s =========================
@jrbourbeau
Copy link
Member

@kloczek I see these lines

if not os.path.exists('bench/shakespeare.txt'):
os.system('wget http://www.gutenberg.org/files/100/100-0.txt'
' -O bench/shakespeare.txt')

which should download the file if it's not present. Is this still an issue for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants