File: 01_only_load_lorem_ipsum_for_tests.diff

package info (click to toggle)
jaraco.text 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: python: 385; sh: 8; makefile: 5
file content (31 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Only load lorem ipsum for tests
--- a/jaraco/text/__init__.py
+++ b/jaraco/text/__init__.py
@@ -181,6 +181,7 @@
     Wrap lines of text, retaining existing newlines as
     paragraph markers.
 
+    >>> lorem_ipsum: str = files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
     >>> print(wrap(lorem_ipsum))
     Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
     eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
@@ -213,6 +214,7 @@
     r"""
     Given a multi-line string, return an unwrapped version.
 
+    >>> lorem_ipsum: str = files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
     >>> wrapped = wrap(lorem_ipsum)
     >>> wrapped.count('\n')
     20
@@ -229,11 +231,6 @@
     return '\n'.join(cleaned)
 
 
-lorem_ipsum: str = (
-    files(__name__).joinpath('Lorem ipsum.txt').read_text(encoding='utf-8')
-)
-
-
 class Splitter:
     """object that will split a string with the given arguments for each call