Describe the bug
Modules test_cleaner.py, test_tokenizer.py, test_word_counter.py, and test_system.py all import fixture temporary_directory_of_files_with_texts. This fixture calls fixture temporary_directory. Using fixture temporary_directory_of_files_with_texts requires importing both fixtures.
...
@pytest.fixture(scope = "session")
def temporary_directory(tmp_path_factory) -> pathlib.PosixPath:
'''
Provides a pathlib.PosixPath object for a temporary directory
Keyword arguments:
tmp_path_factory
Return values:
temporary_directory: pathlib.PosixPath -- a pathlib.PosixPath object for a temporary directory
Side effects:
none
Exceptions raised:
none
Restrictions of when this is called:
This function is called automatically by pytest.
'''
temp_dir = tmp_path_factory.mktemp("temporary_directory")
return temp_dir
@pytest.fixture(params = [dictionary_of_IDs_and_base_names_of_texts], scope = "session")
def temporary_directory_of_files_with_texts(request: pytest.FixtureRequest, temporary_directory) -> pathlib.PosixPath:
'''
Provides a pathlib.PosixPath object for a temporary directory of files with texts
Keyword arguments:
request: pytest.FixtureRequest -- a request from which to get a specified parameter
temporary_directory
Return values:
temporary_directory
Side effects:
Creates files with texts
Exceptions raised:
none
Restrictions on when this is called:
This function is called automatically by pytest
'''
...
return temporary_directory
...
Describe the bug Modules test_cleaner.py, test_tokenizer.py, test_word_counter.py, and test_system.py all import fixture temporary_directory_of_files_with_texts. This fixture calls fixture temporary_directory. Using fixture temporary_directory_of_files_with_texts requires importing both fixtures.
To Reproduce Package versions
(add any relevant pylint/pytest plugin here)
Folder structure
File content
tests/fixtures.py
:tests/test_system.py:
pylint output with the plugin
(Optional) pytest output from fixture collection
Expected behavior I expected these pylint false positives to be suppressed.
Additional context Add any other context about the problem here.