File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import pytest
2+ import os
23from src .file_processor import FileProcessor
34
45def test_read_docx ():
56 file_processor = FileProcessor ()
6- with open ("../../data/input/fanatyk.docx" , "rb" ) as file :
7+ base_dir = os .path .abspath (os .path .join (os .path .dirname (__file__ ), "../../../data/input" ))
8+ file_path = os .path .join (base_dir , "fanatyk.docx" )
9+ with open (file_path , "rb" ) as file :
710 file_processor .file = file
811 file_processor .file_type = ".txt"
912 content = file_processor ._read_docx
Original file line number Diff line number Diff line change 11import pytest
2+ import os
23from src .file_processor import FileProcessor
34
45
56def test_read_pdf ():
67 file_processor = FileProcessor ()
7- with open ("../../data/input/fanatyk.pdf" , "rb" ) as file :
8+ base_dir = os .path .abspath (os .path .join (os .path .dirname (__file__ ), "../../../data/input" ))
9+ file_path = os .path .join (base_dir , "fanatyk.pdf" )
10+ with open (file_path , "rb" ) as file :
811 file_processor .file = file
912 file_processor .file_type = ".pdf"
1013 content = file_processor ._read_pdf ()
You can’t perform that action at this time.
0 commit comments