* Add comprehensive tests for IMAP email restoration functionality - Implement tests for loading labels manifest, including both old and new formats. - Add tests for extracting flags from the manifest. - Create tests for parsing .eml files, including edge cases. - Develop tests for retrieving .eml files from a directory. - Validate configuration settings and handle missing credentials. - Integrate tests for restoring emails from a backup, including Gmail mode and deletion of orphaned emails. - Test progress caching and backup folder discovery. - Ensure robust handling of email labels and flags during restoration. - Verify that the restore process correctly interacts with a mock IMAP server. * Add comprehensive tests for IMAP utilities and compression support - Introduced tests for `imap_common.py` covering environment variable verification, IMAP connection handling, folder name normalization, MIME header decoding, message details extraction, duplicate detection, filename sanitization, and trash folder detection. - Added tests for `imap_compress.py` to validate the functionality of the `_CompressedSocket` wrapper, ensuring data compression and decompression works as expected. - Implemented integration tests to verify that compression is enabled during IMAP connection setup.
25 lines
641 B
Python
25 lines
641 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
DEPRECATED: This script has been renamed.
|
|
Please use imap_count.py instead.
|
|
"""
|
|
|
|
import sys
|
|
|
|
from imap_count import main
|
|
|
|
if __name__ == "__main__":
|
|
print(
|
|
"WARNING: 'count_imap_emails.py' is deprecated and will be removed in a future version. Exact functionality is now available via 'imap_count.py'.",
|
|
file=sys.stderr,
|
|
)
|
|
print("Redirecting to 'imap_count.py'...", file=sys.stderr)
|
|
try:
|
|
main()
|
|
except KeyboardInterrupt:
|
|
print("\nProcess terminated by user.")
|
|
sys.exit(0)
|
|
except Exception as e:
|
|
print(f"Fatal Error: {e}")
|
|
sys.exit(1)
|