You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When pytest is run following the development configuration instructions in CONTRIBUTING (line 40), mypy fails.
The issue seems to be in calling mypy from pytest via the pytest.ini config.
Note that pytest seems to using plugin mypy-0.10.3 while when running separately, mypy version = 1.11.2.
See stack trace and more info below.
To Reproduce
Follow configuration instructions in CONTRIBUTING. I tested environments with python 3.8 and 3.10.
Expected behavior
All tests should pass.
Desktop (please complete the following information):
Python 3.8 and 3.10
Additional context
Stacktrace:
tests/integration/__init__.py::mypy
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/main.py", line 283, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/main.py", line 337, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/logging.py", line 803, in pytest_runtestloop
INTERNALERROR> return (yield) # Run all the tests.
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/terminal.py", line 673, in pytest_runtestloop
INTERNALERROR> result = yield
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/main.py", line 362, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/warnings.py", line 112, in pytest_runtest_protocol
INTERNALERROR> return (yield)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/assertion/__init__.py", line 176, in pytest_runtest_protocol
INTERNALERROR> return (yield)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/unittest.py", line 429, in pytest_runtest_protocol
INTERNALERROR> res = yield
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/faulthandler.py", line 88, in pytest_runtest_protocol
INTERNALERROR> return (yield)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/runner.py", line 113, in pytest_runtest_protocol
INTERNALERROR> runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/runner.py", line 126, in runtestprotocol
INTERNALERROR> rep = call_and_report(item, "setup", log)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/runner.py", line 244, in call_and_report
INTERNALERROR> report: TestReport = ihook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_hooks.py", line 513, in __call__
INTERNALERROR> return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_manager.py", line 120, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 139, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/tmpdir.py", line 318, in pytest_runtest_makereport
INTERNALERROR> rep = yield
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 122, in _multicall
INTERNALERROR> teardown.throw(exception) # type: ignore[union-attr]
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/skipping.py", line 269, in pytest_runtest_makereport
INTERNALERROR> rep = yield
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/pluggy/_callers.py", line 103, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/runner.py", line 368, in pytest_runtest_makereport
INTERNALERROR> return TestReport.from_item_and_call(item, call)
INTERNALERROR> File "/opt/anaconda3/envs/basin3d-38sqlal/lib/python3.8/site-packages/_pytest/reports.py", line 369, in from_item_and_call
INTERNALERROR> assert line is not None
INTERNALERROR> AssertionError
I tried a few things to troubleshoot:
With python 3.10, I changed the python version in the mypy.ini file.
I removed the --mypy option in the pytest.ini file to confirm that it was calling mypy from this mode. All other pytests pass.
Running mypy separately, all mypy checks pass.
The text was updated successfully, but these errors were encountered:
Describe the bug
When
pytest
is run following the development configuration instructions in CONTRIBUTING (line 40), mypy fails.The issue seems to be in calling mypy from pytest via the pytest.ini config.
Note that pytest seems to using plugin mypy-0.10.3 while when running separately, mypy version = 1.11.2.
See stack trace and more info below.
To Reproduce
Follow configuration instructions in CONTRIBUTING. I tested environments with python 3.8 and 3.10.
Expected behavior
All tests should pass.
Desktop (please complete the following information):
Additional context
Stacktrace:
I tried a few things to troubleshoot:
The text was updated successfully, but these errors were encountered: