Commit a561b91 1 parent fcedb98 commit a561b91 Copy full SHA for a561b91
File tree 1 file changed +2
-15
lines changed
1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import pytest
7
7
8
- from pypdf import PdfReader
9
-
10
8
TESTS_ROOT = Path (__file__ ).parent .resolve ()
11
9
PROJECT_ROOT = TESTS_ROOT .parent
12
10
RESOURCE_ROOT = PROJECT_ROOT / "resources"
13
11
14
12
15
13
@pytest .fixture (scope = "session" )
16
14
def pdf_file_path (tmp_path_factory ):
17
- fn = tmp_path_factory .mktemp ("pypdf-data" ) / f"{ uuid .uuid4 ()} .pdf"
18
- return fn
15
+ return tmp_path_factory .mktemp ("pypdf-data" ) / f"{ uuid .uuid4 ()} .pdf"
19
16
20
17
21
18
@pytest .fixture (scope = "session" )
22
19
def txt_file_path (tmp_path_factory ):
23
- fn = tmp_path_factory .mktemp ("pypdf-data" ) / f"{ uuid .uuid4 ()} .txt"
24
- return fn
25
-
26
-
27
- @pytest .fixture (scope = "session" )
28
- def pdf_reader_page ():
29
- """Gives a page that was retrieved from a PDF via PdfReader."""
30
- pdf_path = RESOURCE_ROOT / "crazyones.pdf"
31
- reader = PdfReader (pdf_path )
32
- page = reader .pages [0 ]
33
- return page
20
+ return tmp_path_factory .mktemp ("pypdf-data" ) / f"{ uuid .uuid4 ()} .txt"
You can’t perform that action at this time.
0 commit comments