【发布时间】:2020-03-11 21:39:21
【问题描述】:
我正在 Mongo 大学参加 MongoDB for Python Developers 课程,但尝试在计算机 mac 上运行 pytest -m 连接时遇到了这个问题:
tests/test_db_connection.py EEEE [100%]
================================================ ============ 错误 ===================================== ======================= _____________________________________________ 设置 test_atlas_setup 时出错 _____________________________________________
请求 = > monkeypatch = <_pytest.monkeypatch.monkeypatch>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')E AttributeError: 'SubRequest' 对象没有属性 'getfuncargvalue'
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109:AttributeError _______________________________________ 设置 test_basic_movies 时出错 _____________________________________________
请求 = > monkeypatch = <_pytest.monkeypatch.monkeypatch>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')E AttributeError: 'SubRequest' 对象没有属性 'getfuncargvalue'
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109:AttributeError _________________________________________ 设置 test_search_by_movie_id 时出错 ___________________________________________
请求 = > monkeypatch = <_pytest.monkeypatch.monkeypatch>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')E AttributeError: 'SubRequest' 对象没有属性 'getfuncargvalue'
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109:AttributeError _________________________________________ 设置 test_simple_text_search 时出错 __________________________________________
请求 = > monkeypatch = <_pytest.monkeypatch.monkeypatch>
@pytest.fixture(autouse=True)
def _configure_application(request, monkeypatch):
"""Use `pytest.mark.options` decorator to pass options to your application
factory::
@pytest.mark.options(debug=False)
def test_something(app):
assert not app.debug, 'the application works not in debug mode!'
"""
if 'app' not in request.fixturenames:
return
app = request.getfuncargvalue('app')E AttributeError: 'SubRequest' 对象没有属性 'getfuncargvalue'
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_flask/plugin.py:109: AttributeError
【问题讨论】:
标签: python python-3.x mongodb