安装了pytest后,运行了一下,看不懂了,不过你前面的说对了
Testing started at 10:15 ...
C:\Users\Administrator\PycharmProjects\untitled4\venv\Scripts\python.exe "D:\Program Files (x86)\PyCharm Community Edition 2018.2.4\helpers\pycharm_jb_pytest_runner.py" --path C:/Users/Administrator/PycharmProjects/untitled4/Day3/test_shopping.py
Launching pytest with arguments C:/Users/Administrator/PycharmProjects/untitled4/Day3/test_shopping.py in C:\Users\Administrator\PycharmProjects\untitled4\Day3
============================= test session starts =============================
platform win32 -- Python 3.5.2, pytest-4.4.0, py-1.8.0, pluggy-0.9.0
rootdir: C:\Users\Administrator\PycharmProjects\untitled4\Day3
test_shopping.py:None (test_shopping.py)
test_shopping.py:6: in
key1=input('请输入要存入的商品名称:')
..\venv\lib\site-packages_pytest\capture.py:693: in read
raise IOError("reading from stdin while output is captured")
E OSError: reading from stdin while output is captured
collected 0 items / 1 errors
=================================== ERRORS ====================================
______________________ ERROR collecting test_shopping.py ______________________
test_shopping.py:6: in
key1=input('请输入要存入的商品名称:')
..\venv\lib\site-packages_pytest\capture.py:693: in read
raise IOError("reading from stdin while output is captured")
E OSError: reading from stdin while output is captured
------------------------------- Captured stdout -------------------------------
请输入要存入的商品名称:
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.33 seconds ===========================
Process finished with exit code 0