"""Test script to verify download functionality.""" import sys from pathlib import Path from PySide6.QtCore import QStandardPaths, QUrl from PySide6.QtWebEngineCore import QWebEngineDownloadRequest from PySide6.QtWidgets import QApplication # Test download path resolution downloads_path = QStandardPaths.writableLocation(QStandardPaths.StandardLocation.DownloadLocation) print(f"Downloads folder: {downloads_path}") print(f"Downloads exists: {Path(downloads_path).exists()}") # Test file path construction test_filename = "test_file.pdf" download_file = Path(downloads_path) / test_filename print(f"Test download path: {download_file}") print(f"Parent exists: {download_file.parent.exists()}")