MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / check

Function check

tests_python/test_code_obj_to_source_code.py:8–16  ·  view source on GitHub ↗
(obtained, expected, strip_return_none=True)

Source from the content-addressed store, hash-verified

6
7
8def check(obtained, expected, strip_return_none=True):
9 keepends = False
10 obtained_lines = list(obtained.rstrip().splitlines(keepends))
11 if strip_return_none:
12 obtained_lines = [x.replace("return None", "") for x in obtained_lines]
13
14 expected_lines = list(expected.rstrip().splitlines(keepends))
15
16 assert obtained_lines == expected_lines
17
18
19def test_code_obj_to_source_make_class_and_func():

Calls

no outgoing calls

Tested by

no test coverage detected