Pytest -m connection have lo

Getting lots of error have no clue

(base) C:\Amit\WorkSpaces\PythonWorkspaces\MONGO_PY\mflix-python>pytest -m connection
============================= test session starts =============================
platform win32 – Python 3.7.1, pytest-4.0.2, py-1.7.0, pluggy-0.8.0
rootdir: C:\Amit\WorkSpaces\PythonWorkspaces\MONGO_PY\mflix-python, inifile:
plugins: remotedata-0.3.1, openfiles-0.3.1, flask-0.10.0, doctestplus-0.2.0, arraydiff-0.3
collected 43 items / 39 deselected

tests\test_db_connection.py EEEE [100%]

=================================== ERRORS ====================================
_____________________ ERROR at setup of test_atlas_setup ______________________

request = <SubRequest ‘_configure_application’ for <Function ‘test_atlas_setup’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000175107C7CC0>

@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 _pytest.warning_types.RemovedInPytest4Warning: getfuncargvalue is deprecated, use getfixturevalue

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: RemovedInPytest4Warning
_____________________ ERROR at setup of test_basic_movies _____________________

request = <SubRequest ‘_configure_application’ for <Function ‘test_basic_movies’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x0000017510821C50>

@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')

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109:


request = <SubRequest ‘_configure_application’ for <Function ‘test_atlas_setup’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000175107C7CC0>

@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 _pytest.warning_types.RemovedInPytest4Warning: getfuncargvalue is deprecated, use getfixturevalue

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: RemovedInPytest4Warning
__________________ ERROR at setup of test_search_by_movie_id __________________

request = <SubRequest ‘_configure_application’ for <Function ‘test_search_by_movie_id’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000175107C7898>

@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')

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109:


C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: in _configure_application
app = request.getfuncargvalue(‘app’)


request = <SubRequest ‘_configure_application’ for <Function ‘test_atlas_setup’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000175107C7CC0>

@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 _pytest.warning_types.RemovedInPytest4Warning: getfuncargvalue is deprecated, use getfixturevalue

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: RemovedInPytest4Warning
__________________ ERROR at setup of test_simple_text_search __________________

request = <SubRequest ‘_configure_application’ for <Function ‘test_simple_text_search’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x0000017510834320>

@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')

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109:


C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: in _configure_application
app = request.getfuncargvalue(‘app’)
C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: in _configure_application
app = request.getfuncargvalue(‘app’)


request = <SubRequest ‘_configure_application’ for <Function ‘test_atlas_setup’>>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x00000175107C7CC0>

@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 _pytest.warning_types.RemovedInPytest4Warning: getfuncargvalue is deprecated, use getfixturevalue

C:\Software\Anaconda\lib\site-packages\pytest_flask\plugin.py:109: RemovedInPytest4Warning
=================== 39 deselected, 4 error in 1.08 seconds ====================

I am having the same issue.

They have pushed a new fix. Try, pip install pytest-flask or pip install -U pytest-flask. But this shouldn’t stop you from proceeding with the exercises. You can directly run ‘python run.py’ and test if your changes worked.

3 Likes

Thank you, this worked for me

4 Likes