Skip to content

Commit 5087aab

Browse files
HackyRootdaavoo
authored andcommitted
Fix import errors
1 parent ad2b134 commit 5087aab

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/document_to_podcast/preprocessing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from .data_loaders import load_pdf, load_txt, load_docx, load_url, load_file
1+
from .data_loaders import load_txt, load_url, load_file
22
from .data_cleaners import (
33
clean_with_regex,
44
clean_html,

tests/integration/test_data_load_and_clean.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
markdown_to_text,
44
)
55
from document_to_podcast.preprocessing.data_loaders import load_txt, load_file
6+
from unittest.mock import Mock
67

78

89
def test_load_and_clean_pdf(example_data):
@@ -11,7 +12,7 @@ def test_load_and_clean_pdf(example_data):
1112
# Create mock file using Mock
1213
mock_file = Mock()
1314
mock_file.name = file_path.name
14-
mock_file.getvalue.return_value = open(file_path, 'rb').read()
15+
mock_file.getvalue.return_value = open(file_path, "rb").read()
1516

1617
result = load_file(mock_file)
1718

@@ -25,7 +26,7 @@ def test_load_and_clean_html(example_data):
2526
# Create mock file using Mock
2627
mock_file = Mock()
2728
mock_file.name = file_path.name
28-
mock_file.getvalue.return_value = open(file_path, 'rb').read()
29+
mock_file.getvalue.return_value = open(file_path, "rb").read()
2930

3031
result = load_file(mock_file)
3132

0 commit comments

Comments
 (0)