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

test_process_warning fails #284

Open
felixonmars opened this issue Oct 12, 2020 · 0 comments
Open

test_process_warning fails #284

felixonmars opened this issue Oct 12, 2020 · 0 comments

Comments

@felixonmars
Copy link

I am getting test failure in test_process_warning. It seems the warning is produced and captured by pytest instead:

test_fuzzywuzzy_pytest.py F                                              [100%]

=================================== FAILURES ===================================
_____________________________ test_process_warning _____________________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f43917848b0>

    def test_process_warning(capsys):
        """Check that a string reduced to 0 by processor logs a warning to stderr"""

        query = ':::::::'
        choices = [':::::::']

        _ = process.extractOne(query, choices)

        out, err = capsys.readouterr()

        outstr = ("WARNING:root:Applied processor reduces "
                  "input query to empty string, "
                  "all comparisons will have score 0. "
                  "[Query: ':::::::']\n")

>       assert err == outstr
E       assert '' == "WARNING:root... ':::::::']\n"
E         - WARNING:root:Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ':::::::']

test_fuzzywuzzy_pytest.py:19: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  root:process.py:81 Applied processor reduces input query to empty string, all comparisons will have score 0. [Query: ':::::::']
=========================== short test summary info ============================
FAILED test_fuzzywuzzy_pytest.py::test_process_warning - assert '' == "WARNIN...
========================= 1 failed, 70 passed in 3.21s =========================

Environment: Arch Linux x86_64

platform linux -- Python 3.8.6, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
rootdir: /build/python-fuzzywuzzy/src/fuzzywuzzy-0.18.0
plugins: hypothesis-5.36.1
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

1 participant