mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
Add test_extract_text_punctuation
This commit is contained in:
@@ -131,6 +131,15 @@ class Test(unittest.TestCase):
|
||||
assert wordsB[2]["text"] == "al."
|
||||
assert wordsC[2]["text"] == "al"
|
||||
|
||||
def test_extract_text_punctuation(self):
|
||||
path = os.path.join(HERE, "pdfs/test-punkt.pdf")
|
||||
with pdfplumber.open(path) as pdf:
|
||||
text = pdf.pages[0].extract_text(
|
||||
layout=True,
|
||||
split_at_punctuation=True,
|
||||
)
|
||||
assert "https " in text
|
||||
|
||||
def test_text_flow(self):
|
||||
path = os.path.join(HERE, "pdfs/federal-register-2020-17221.pdf")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user