Skip to content

Commit d40ecd6

Browse files
committed
Ignore hard to to test code.
1 parent bab4094 commit d40ecd6

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

domdf_python_tools/pagesizes/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def parse_measurement(measurement: str) -> Union[float, Tuple[float, ...]]:
9797

9898
# TODO: docstring
9999
match = _measurement_re.findall(measurement)[0]
100-
print(match)
101-
print(len(match))
100+
# print(match)
101+
# print(len(match))
102102
if len(match) < 2:
103103
raise ValueError("Unable to parse measurement")
104104
else:

domdf_python_tools/paths.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ def open(
401401
errors: Optional[str] = None,
402402
newline: Optional[str] = None,
403403
) -> IO[Any]:
404-
405404
"""
406405
Open the file pointed by this path and return a file object, as
407406
the built-in open() function does.

domdf_python_tools/terminal.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def overtype(*objects, sep: str = ' ', end: str = '', file=sys.stdout, flush: bo
134134
print(*objects, sep=sep, end=end, file=file, flush=flush)
135135

136136

137-
def get_terminal_size() -> Tuple[int, int]:
137+
def get_terminal_size() -> Tuple[int, int]: # pragma: no cover
138138
"""
139139
Get width and height of console.
140140
@@ -164,7 +164,7 @@ def get_terminal_size() -> Tuple[int, int]:
164164
return tuple_xy
165165

166166

167-
def _get_terminal_size_windows() -> Optional[Tuple[int, int]]:
167+
def _get_terminal_size_windows() -> Optional[Tuple[int, int]]: # pragma: no cover
168168
try:
169169

170170
# stdlib
@@ -190,7 +190,7 @@ def _get_terminal_size_windows() -> Optional[Tuple[int, int]]:
190190
return None
191191

192192

193-
def _get_terminal_size_tput() -> Optional[Tuple[int, int]]:
193+
def _get_terminal_size_tput() -> Optional[Tuple[int, int]]: # pragma: no cover
194194
# get terminal width
195195
# src: http://stackoverflow.com/questions/263890/how-do-i-find-the-width-height-of-a-terminal-window
196196
try:
@@ -201,7 +201,7 @@ def _get_terminal_size_tput() -> Optional[Tuple[int, int]]:
201201
return None
202202

203203

204-
def _get_terminal_size_posix() -> Optional[Tuple[int, int]]:
204+
def _get_terminal_size_posix() -> Optional[Tuple[int, int]]: # pragma: no cover
205205

206206
# stdlib
207207
import fcntl
@@ -257,6 +257,6 @@ def __exit__(self, exc_t, exc_v, tb):
257257
print(textwrap.indent(pprint.pformat(new_locals), self.indent))
258258

259259

260-
if __name__ == "__main__":
260+
if __name__ == "__main__": # pragma: no cover
261261
size_x, size_y = get_terminal_size()
262262
print("width =", size_x, "height =", size_y)

tests/test_paths_stdlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,5 +1031,5 @@ def test_glob_empty_pattern(self):
10311031
list(p.glob(''))
10321032

10331033

1034-
if __name__ == "__main__":
1034+
if __name__ == "__main__": # pragma: no cover
10351035
unittest.main()

0 commit comments

Comments
 (0)