-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7027f2
commit cccf543
Showing
1 changed file
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
""" | ||
The file_processing_test_data package provides sample test files for use in testing | ||
the file-processing suite of libraries. This package includes utilities to retrieve | ||
the path to test files and list all available test files. | ||
Functions: | ||
get_test_files_path: Returns the path to the directory containing test files. | ||
get_all_test_files: Returns a list of all test files in the test_files directory. | ||
""" | ||
|
||
from pathlib import Path | ||
import pkg_resources | ||
|
||
def get_test_files_path(): | ||
"""Returns the path to the test_files directory.""" | ||
""" | ||
Returns the path to the test_files directory. | ||
This function locates the directory containing test files, which can be used | ||
for testing and development with the file-processing suite. | ||
Returns: | ||
Path: Path object pointing to the test_files directory. | ||
""" | ||
return Path(pkg_resources.resource_filename('file_processing_test_data', 'test_files')) | ||
|
||
def get_all_test_files(): | ||
"""Returns a list of all test files in the test_files directory.""" | ||
""" | ||
Returns a list of all test files in the test_files directory. | ||
This function gathers all files in the test_files directory, providing a list | ||
of file paths for use in automated tests. | ||
Returns: | ||
list: A list of file paths (as strings) for all files in the test_files directory. | ||
""" | ||
test_files_path = get_test_files_path() | ||
return [str(f) for f in test_files_path.glob('*') if f.is_file()] |