reformatting
formatting_check / formatting_check (push) Failing after 3s
Python Test / test (.ps1, windows-latest, 3.9) (push) Has been cancelled
Python Test / test (.sh, macos-latest, 3.9) (push) Has been cancelled
Python Test / test (.sh, ubuntu-latest, 3.9) (push) Has been cancelled

This commit is contained in:
2026-07-14 21:32:55 +12:00
parent 3d0658b483
commit 0157f462cc
17 changed files with 439 additions and 377 deletions
+7 -5
View File
@@ -4,14 +4,15 @@ Test script to verify that the duplicate folder creation fix works correctly.
This script simulates the scenario where duplicate posts would previously create empty folders.
"""
import tempfile
import shutil
from pathlib import Path
from unittest.mock import MagicMock
# Add the bdfr module to the path
import sys
sys.path.insert(0, '.')
import tempfile
from pathlib import Path
from unittest.mock import MagicMock
sys.path.insert(0, ".")
from bdfr.configuration import Configuration
from bdfr.connector import RedditConnector
@@ -69,6 +70,7 @@ def test_duplicate_folder_creation_fix():
# Mock the download factory
import bdfr.site_downloaders.download_factory as df
original_pull_lever = df.DownloadFactory.pull_lever
df.DownloadFactory.pull_lever = MagicMock(return_value=mock_downloader_class)
@@ -93,4 +95,4 @@ def test_duplicate_folder_creation_fix():
if __name__ == "__main__":
test_duplicate_folder_creation_fix()
print("All tests passed! The duplicate folder creation fix is working correctly.")
print("All tests passed! The duplicate folder creation fix is working correctly.")