We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
文中写的是 $ pytest tests/test-function/test_parametrize.py ============================= test session starts ============================= platform win32 -- Python 3.6.4, pytest-3.6.1, py-1.5.2, pluggy-0.6.0 rootdir: F:\self-repo\learning-pytest, inifile: collected 3 items
tests\test-function\test_parametrize.py F.. [100%]
================================== FAILURES ===================================
但根据代码实际运行的结果是 ================================================================================================================= test session starts ================================================================================================================= platform win32 -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 rootdir: C:\Users\w00611915\PycharmProjects\learn_pytest collected 3 items
test_parametrize.py F.. [100%]
====================================================================================================================== FAILURES ======================================================================================================================= _____________________________________________________________________________________________________________ test_passwd_length[123456] ______________________________________________________________________________________________________________
passwd = '123456'
@pytest.mark.parametrize('passwd', ['123456', 'abcdefdfs', 'as52345fasdf4']) def test_passwd_length(passwd):
assert len(passwd) >= 8
E AssertionError: assert 6 >= 8 E + where 6 = len('123456')
test_parametrize.py:8: AssertionError =============================================================================================================== short test summary info =============================================================================================================== FAILED test_parametrize.py::test_passwd_length[123456] - AssertionError: assert 6 >= 8 ============================================================================================================= 1 failed, 2 passed in 0.05s =============================================================================================================
The text was updated successfully, but these errors were encountered:
No branches or pull requests
文中写的是
$ pytest tests/test-function/test_parametrize.py
============================= test session starts =============================
platform win32 -- Python 3.6.4, pytest-3.6.1, py-1.5.2, pluggy-0.6.0
rootdir: F:\self-repo\learning-pytest, inifile:
collected 3 items
tests\test-function\test_parametrize.py F.. [100%]
================================== FAILURES ===================================
但根据代码实际运行的结果是
================================================================================================================= test session starts =================================================================================================================
platform win32 -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: C:\Users\w00611915\PycharmProjects\learn_pytest
collected 3 items
test_parametrize.py F.. [100%]
====================================================================================================================== FAILURES =======================================================================================================================
_____________________________________________________________________________________________________________ test_passwd_length[123456] ______________________________________________________________________________________________________________
passwd = '123456'
E AssertionError: assert 6 >= 8
E + where 6 = len('123456')
test_parametrize.py:8: AssertionError
=============================================================================================================== short test summary info ===============================================================================================================
FAILED test_parametrize.py::test_passwd_length[123456] - AssertionError: assert 6 >= 8
============================================================================================================= 1 failed, 2 passed in 0.05s =============================================================================================================
The text was updated successfully, but these errors were encountered: