exasol / advanced-analytics-framework

Framework for building complex data analysis algorithms with Exasol
MIT License
0 stars 0 forks source link

Rename global pytest fixtures #188

Closed ckunki closed 3 weeks ago

ckunki commented 1 month ago

The current ticket requests to rename global fixtures to precisely describe the provided results.

See for example fixture top_level_query_handler_context_fixture.py in ML Lib.

Background

Implementing ticket #176 showed some redundancies in pytest fixtures. E.g. in file vs. fixtures.

Discussion r1791481176 in PR #186 compares two similar fixtures with identical name:

ckunki commented 4 weeks ago

Global fixtures in project AAF

integration_tests/with_db/fixtures/setup_database_fixture.py:

At least some of their names sound quite unique to me. Do we really need to rename these fixtures?

Fixture Renamed to Used in
db_schema_name itest_db_schema Other fixtures in the same file
deployed_scripts (unchanged) Other fixtures in the same file.
database_with_slc (unchanged) test_query_loop_integration.py and test_user_guide_example.py

The fixtures from unit_tests/query_handler/fixtures.py are used only by test cases in a few pytest files.

I therefore propose to either move the fixture to the resp. files or to remove the tests/unit_tests/conftest.py from the list of global pytest plugins in order to make the fixtures non-global.

Fixture Renamed to Used in
prefix tmp_db_obj_prefix test_scope_query_handler_context.py
schema aaf_pytest_db_schema test_scope_query_handler_context.py
test_connection connection_mock test_scope_query_handler_context.py
test_connection_lookup connection_lookup_mock test_scope_query_handler_context.py
scope_query_handler_context: scope_query_handler_context_mock test_scope_query_handler_context.py
bucketfs_location sample_bucketfs_location test_scope_query_handler_context.py and test_top_level_query_handler_context.py
top_level_query_handler_context top_level_query_handler_context_mock test_top_level_query_handler_context.py
mocked_temporary_bucketfs_location (unchanged) test_python_query_handler_runner.py
sample_mounted_bucket (unchanged) fixture bucketfs_location in the same file

Other fixtures in project AAF