Giter Club home page Giter Club logo

Comments (3)

windiana42 avatar windiana42 commented on May 24, 2024

tests/integration/test_multiple_statements.py:None (tests/integration/test_multiple_statements.py)
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/_pytest/config/__init__.py:1540: in getoption
    val = getattr(self.option, name)
E   AttributeError: 'Namespace' object has no attribute 'backend'

The above exception was the direct cause of the following exception:
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/pluggy/_hooks.py:265: in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/pluggy/_manager.py:80: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/_pytest/python.py:272: in pytest_pycollect_makeitem
    return list(collector._genfunctions(name, obj))
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/_pytest/python.py:499: in _genfunctions
    self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/pluggy/_hooks.py:292: in call_extra
    return self(**kwargs)
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/pluggy/_hooks.py:265: in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/pluggy/_manager.py:80: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
integration/conftest.py:42: in pytest_generate_tests
    "backend", [metafunc.config.getoption("backend")], scope="module"
../../../progs/miniconda3/envs/pytsql/lib/python3.10/site-packages/_pytest/config/__init__.py:1551: in getoption
    raise ValueError(f"no option named {name!r}") from e
E   ValueError: no option named 'backend'

from pytsql.

windiana42 avatar windiana42 commented on May 24, 2024

This code snippet in conftest.py seems to be related:

def pytest_generate_tests(metafunc):
    if "backend" in metafunc.fixturenames:
        metafunc.parametrize(
            "backend", [metafunc.config.getoption("backend")], scope="module"
        )

from pytsql.

windiana42 avatar windiana42 commented on May 24, 2024

proposed solution will be as a commit in issue44 (#44) branch/PR:

def pytest_generate_tests(metafunc):
    if "backend" in metafunc.fixturenames:
        try:
            metafunc.parametrize(
                "backend", [metafunc.config.getoption("backend")], scope="module"
            )
        except ValueError:
            # some metafunc.config objects don't have an option "backend"
            metafunc.parametrize(
                "backend", ["default_backend"], scope="module"
            )

from pytsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.