-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix small bugs with docx reader such as non-integer sizes in docx sty…
…le and filename with dots and spaces
- Loading branch information
1 parent
f203aef
commit 0212271
Showing
6 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import unittest | ||
|
||
from dedoc.utils.utils import splitext_ | ||
|
||
|
||
class TestRecognizedTable(unittest.TestCase): | ||
|
||
def test_splitext_simple_name(self) -> None: | ||
name_extension = "name.doc" | ||
name, extension = splitext_(name_extension) | ||
self.assertEqual("name", name) | ||
self.assertEqual(".doc", extension) | ||
|
||
def test_splitext_apostrophe_name(self) -> None: | ||
name_extension = "Well. Known -Nik O'Tinn -Ireland 2023- DRAFT.doc" | ||
name, extension = splitext_(name_extension) | ||
self.assertEqual("Well. Known -Nik O'Tinn -Ireland 2023- DRAFT", name) | ||
self.assertEqual(".doc", extension) | ||
|
||
def test_splitext_space_name(self) -> None: | ||
name_extension = "some file .doc" | ||
name, extension = splitext_(name_extension) | ||
self.assertEqual("some file ", name) | ||
self.assertEqual(".doc", extension) |