mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 03:27:34 +00:00
Add comprehensive tests for formatter classes, services, and utilities
- Introduced tests for various formatter classes including TextFormatter, DurationFormatter, SizeFormatter, DateFormatter, and more to ensure correct formatting behavior. - Added tests for service classes such as FileTreeService, MetadataService, and RenameService, covering directory validation, metadata extraction, and file renaming functionalities. - Implemented utility tests for LanguageCodeExtractor, PatternExtractor, and FrameClassMatcher to validate their extraction and matching capabilities. - Updated test cases to use datasets for better maintainability and clarity. - Enhanced error handling tests to ensure robustness against missing or invalid data.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
"""Constants package for Renamer.
|
||||
|
||||
This package contains constants split into logical modules:
|
||||
- media_constants.py: Media type definitions (MEDIA_TYPES)
|
||||
- source_constants.py: Video source types (SOURCE_DICT)
|
||||
- frame_constants.py: Resolution/frame classes (FRAME_CLASSES)
|
||||
- moviedb_constants.py: Movie database identifiers (MOVIE_DB_DICT)
|
||||
- edition_constants.py: Special edition types (SPECIAL_EDITIONS)
|
||||
- lang_constants.py: Language-related constants (SKIP_WORDS)
|
||||
- year_constants.py: Year validation (CURRENT_YEAR, MIN_VALID_YEAR, etc.)
|
||||
- cyrillic_constants.py: Cyrillic character normalization (CYRILLIC_TO_ENGLISH)
|
||||
"""
|
||||
|
||||
# Import from all constant modules
|
||||
from .media_constants import MEDIA_TYPES
|
||||
from .source_constants import SOURCE_DICT
|
||||
from .frame_constants import FRAME_CLASSES, NON_STANDARD_QUALITY_INDICATORS
|
||||
from .moviedb_constants import MOVIE_DB_DICT
|
||||
from .edition_constants import SPECIAL_EDITIONS
|
||||
from .lang_constants import SKIP_WORDS
|
||||
from .year_constants import CURRENT_YEAR, MIN_VALID_YEAR, YEAR_FUTURE_BUFFER, is_valid_year
|
||||
from .cyrillic_constants import CYRILLIC_TO_ENGLISH
|
||||
|
||||
__all__ = [
|
||||
# Media types
|
||||
'MEDIA_TYPES',
|
||||
# Source types
|
||||
'SOURCE_DICT',
|
||||
# Frame classes
|
||||
'FRAME_CLASSES',
|
||||
'NON_STANDARD_QUALITY_INDICATORS',
|
||||
# Movie databases
|
||||
'MOVIE_DB_DICT',
|
||||
# Special editions
|
||||
'SPECIAL_EDITIONS',
|
||||
# Language constants
|
||||
'SKIP_WORDS',
|
||||
# Year validation
|
||||
'CURRENT_YEAR',
|
||||
'MIN_VALID_YEAR',
|
||||
'YEAR_FUTURE_BUFFER',
|
||||
'is_valid_year',
|
||||
# Cyrillic normalization
|
||||
'CYRILLIC_TO_ENGLISH',
|
||||
]
|
||||
Reference in New Issue
Block a user