pymasep.tests
This package provides unit tests method/fixture for the pymasep package and applications.
Submodules
Functions
|
Remove files with a certain pattern inside path and subdirectories |
|
Create a mock game for the current project with empty configuration |
|
Create a mock environment for the current project with empty configuration |
|
Create a mock environment for the current project with configuration defined as fixture |
|
Pytest fixture that set the base directory for the tests |
|
Pytest fixture that set the base directory for the unit tests |
|
Cleanup a testing directory once we are finished. |
Package Contents
- pymasep.tests.remove_recursive_file(path, pattern)
Remove files with a certain pattern inside path and subdirectories
Copyright © 2022 thisPointer
- Parameters:
path (str) – Path to recursively search in.
pattern (str) – The file patterns to delete.
- Raises:
PermissionError – In windows (file still open ?) TO REFACTOR
OSError – if error occurs during deletion
- Return type:
None
- pymasep.tests.mock_game(game_class)
Create a mock game for the current project with empty configuration
- pymasep.tests.mock_environment(mock_game)
Create a mock environment for the current project with empty configuration
- pymasep.tests.mock_environment_conf(configuration, game_class)
Create a mock environment for the current project with configuration defined as fixture
- pymasep.tests.base_directory(relative_path, request)
Pytest fixture that set the base directory for the tests
- pymasep.tests.base_directory_unit(relative_path, request)
Pytest fixture that set the base directory for the unit tests
- pymasep.tests.cleanup(request)
Cleanup a testing directory once we are finished.