Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connection fixture confusion in processes/processing/conftest.py #31

Open
soxofaan opened this issue Jan 19, 2024 · 1 comment
Open

Comments

@soxofaan
Copy link
Member

@pytest.fixture(scope="module")
def connection(
request, runner: str, auto_authenticate: bool, pytestconfig
) -> ProcessTestRunner:
# TODO: this fixture override changes the return type of the original `connection` fixture,
# which might lead to problems due to broken assumptions

This connection fixture at src/openeo_test_suite/tests/processes/processing/conftest.py
overrides the fixture defined at src/openeo_test_suite/tests/conftest.py:

@pytest.fixture(scope="module")
def connection(request, auto_authenticate: bool, pytestconfig) -> openeo.Connection:

However the return type is changed from openeo.Connection to ProcessTestRunner, which might lead to problems and broken assumptions.

e.g. I think my question/confusion at #27 is caused by this

How to fix this mismatch?

@m-mohr
Copy link
Member

m-mohr commented Jan 19, 2024

I'm not sure, some types of tests need a Connection, but the individual process tests have a "direct connection". It also felt very akward to subclass Connection and then just implement a couple of methods and all others are "useless".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants