PATH:
opt
/
bitninja-python-dojo
/
embedded
/
lib
/
python3.9
/
test
# Testing the line trace facility. from test import support import unittest import sys import difflib import gc from functools import wraps import asyncio class tracecontext: """Context manager that traces its enter and exit.""" def __init__(self, output, value): self.output = output self.value = value def __enter__(self): self.output.append(self.value) def __exit__(self, *exc_info): self.output.append(-self.value) class asynctracecontext: """Asynchronous context manager that traces its aenter and aexit.""" def __init__(self, output, value): self.output = output self.value = value async def __aenter__(self): self.output.append(self.value) async def __aexit__(self, *exc_info): self.output.append(-self.value) async def asynciter(iterable): """Convert an iterable to an asynchronous iterator.""" for x in iterable: yield x # A very basic example. If this fails, we're in deep trouble. def basic(): return 1 basic.events = [(0, 'call'), (1, 'line'), (1, 'return')] # Many of the tests below are tricky because they involve pass statements. # If there is implicit control flow around a pass statement (in an except # clause or else clause) under what conditions do you set a line number # following that clause? # Some constructs like "while 0:", "if 0:" or "if 1:...else:..." are optimized # away. No code # exists for them, so the line numbers skip directly from # "del x" to "x = 1". def arigo_example0(): x = 1 del x while 0: pass x = 1 arigo_example0.events = [(0, 'call'), (1, 'line'), (2, 'line'), (5, 'line'), (5, 'return')] def arigo_example1(): x = 1 del x if 0: pass x = 1 arigo_example1.events = [(0, 'call'), (1, 'line'), (2, 'line'), (5, 'line'), (5, 'return')] def arigo_example2(): x = 1 del x if 1: x = 1 else: pass return None arigo_example2.events = [(0, 'call'), (1, 'line'), (2, 'line'), (4, 'line'), (7, 'line'), (7, 'return')] # check that lines consisting of just one instruction get traced: def one_instr_line(): x = 1 del x x = 1 one_instr_line.events = [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (3, 'return')] def no_pop_tops(): # 0 x = 1 # 1 for a in range(2): # 2 if a: # 3 x = 1 # 4 else: # 5 x = 1 # 6 no_pop_tops.events = [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (6, 'line'), (2, 'line'), (3, 'line'), (4, 'line'), (2, 'line'), (2, 'return')] def no_pop_blocks(): y = 1 while not y: bla x = 1 no_pop_blocks.events = [(0, 'call'), (1, 'line'), (2, 'line'), (4, 'line'), (4, 'return')] def called(): # line -3 x = 1 def call(): # line 0 called() call.events = [(0, 'call'), (1, 'line'), (-3, 'call'), (-2, 'line'), (-2, 'return'), (1, 'return')] def raises(): raise Exception def test_raise(): try: raises() except Exception: pass test_raise.events = [(0, 'call'), (1, 'line'), (2, 'line'), (-3, 'call'), (-2, 'line'), (-2, 'exception'), (-2, 'return'), (2, 'exception'), (3, 'line'), (4, 'line'), (4, 'return')] def _settrace_and_return(tracefunc): sys.settrace(tracefunc) sys._getframe().f_back.f_trace = tracefunc def settrace_and_return(tracefunc): _settrace_and_return(tracefunc) settrace_and_return.events = [(1, 'return')] def _settrace_and_raise(tracefunc): sys.settrace(tracefunc) sys._getframe().f_back.f_trace = tracefunc raise RuntimeError def settrace_and_raise(tracefunc): try: _settrace_and_raise(tracefunc) except RuntimeError: pass settrace_and_raise.events = [(2, 'exception'), (3, 'line'), (4, 'line'), (4, 'return')] # implicit return example # This test is interesting because of the else: pass # part of the code. The code generate for the true # part of the if contains a jump past the else branch. # The compiler then generates an implicit "return None" # Internally, the compiler visits the pass statement # and stores its line number for use on the next instruction. # The next instruction is the implicit return None. def ireturn_example(): a = 5 b = 5 if a == b: b = a+1 else: pass ireturn_example.events = [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (4, 'line'), (6, 'line'), (6, 'return')] # Tight loop with while(1) example (SF #765624) def tightloop_example(): items = range(0, 3) try: i = 0 while 1: b = items[i]; i+=1 except IndexError: pass tightloop_example.events = [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (5, 'line'), (5, 'line'), (5, 'line'), (5, 'line'), (5, 'exception'), (6, 'line'), (7, 'line'), (7, 'return')] def tighterloop_example(): items = range(1, 4) try: i = 0 while 1: i = items[i] except IndexError: pass tighterloop_example.events = [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (4, 'line'), (4, 'line'), (4, 'line'), (4, 'line'), (4, 'exception'), (5, 'line'), (6, 'line'), (6, 'return')] def generator_function(): try: yield True "continued" finally: "finally" def generator_example(): # any() will leave the generator before its end x = any(generator_function()) # the following lines were not traced for x in range(10): y = x generator_example.events = ([(0, 'call'), (2, 'line'), (-6, 'call'), (-5, 'line'), (-4, 'line'), (-4, 'return'), (-4, 'call'), (-4, 'exception'), (-1, 'line'), (-1, 'return')] + [(5, 'line'), (6, 'line')] * 10 + [(5, 'line'), (5, 'return')]) class Tracer: def __init__(self, trace_line_events=None, trace_opcode_events=None): self.trace_line_events = trace_line_events self.trace_opcode_events = trace_opcode_events self.events = [] def _reconfigure_frame(self, frame): if self.trace_line_events is not None: frame.f_trace_lines = self.trace_line_events if self.trace_opcode_events is not None: frame.f_trace_opcodes = self.trace_opcode_events def trace(self, frame, event, arg): self._reconfigure_frame(frame) self.events.append((frame.f_lineno, event)) return self.trace def traceWithGenexp(self, frame, event, arg): self._reconfigure_frame(frame) (o for o in [1]) self.events.append((frame.f_lineno, event)) return self.trace class TraceTestCase(unittest.TestCase): # Disable gc collection when tracing, otherwise the # deallocators may be traced as well. def setUp(self): self.using_gc = gc.isenabled() gc.disable() self.addCleanup(sys.settrace, sys.gettrace()) def tearDown(self): if self.using_gc: gc.enable() @staticmethod def make_tracer(): """Helper to allow test subclasses to configure tracers differently""" return Tracer() def compare_events(self, line_offset, events, expected_events): events = [(l - line_offset, e) for (l, e) in events] if events != expected_events: self.fail( "events did not match expectation:\n" + "\n".join(difflib.ndiff([str(x) for x in expected_events], [str(x) for x in events]))) def run_and_compare(self, func, events): tracer = self.make_tracer() sys.settrace(tracer.trace) func() sys.settrace(None) self.compare_events(func.__code__.co_firstlineno, tracer.events, events) def run_test(self, func): self.run_and_compare(func, func.events) def run_test2(self, func): tracer = self.make_tracer() func(tracer.trace) sys.settrace(None) self.compare_events(func.__code__.co_firstlineno, tracer.events, func.events) def test_set_and_retrieve_none(self): sys.settrace(None) assert sys.gettrace() is None def test_set_and_retrieve_func(self): def fn(*args): pass sys.settrace(fn) try: assert sys.gettrace() is fn finally: sys.settrace(None) def test_01_basic(self): self.run_test(basic) def test_02_arigo0(self): self.run_test(arigo_example0) def test_02_arigo1(self): self.run_test(arigo_example1) def test_02_arigo2(self): self.run_test(arigo_example2) def test_03_one_instr(self): self.run_test(one_instr_line) def test_04_no_pop_blocks(self): self.run_test(no_pop_blocks) def test_05_no_pop_tops(self): self.run_test(no_pop_tops) def test_06_call(self): self.run_test(call) def test_07_raise(self): self.run_test(test_raise) def test_08_settrace_and_return(self): self.run_test2(settrace_and_return) def test_09_settrace_and_raise(self): self.run_test2(settrace_and_raise) def test_10_ireturn(self): self.run_test(ireturn_example) def test_11_tightloop(self): self.run_test(tightloop_example) def test_12_tighterloop(self): self.run_test(tighterloop_example) def test_13_genexp(self): self.run_test(generator_example) # issue1265: if the trace function contains a generator, # and if the traced function contains another generator # that is not completely exhausted, the trace stopped. # Worse: the 'finally' clause was not invoked. tracer = self.make_tracer() sys.settrace(tracer.traceWithGenexp) generator_example() sys.settrace(None) self.compare_events(generator_example.__code__.co_firstlineno, tracer.events, generator_example.events) def test_14_onliner_if(self): def onliners(): if True: x=False else: x=True return 0 self.run_and_compare( onliners, [(0, 'call'), (1, 'line'), (3, 'line'), (3, 'return')]) def test_15_loops(self): # issue1750076: "while" expression is skipped by debugger def for_example(): for x in range(2): pass self.run_and_compare( for_example, [(0, 'call'), (1, 'line'), (2, 'line'), (1, 'line'), (2, 'line'), (1, 'line'), (1, 'return')]) def while_example(): # While expression should be traced on every loop x = 2 while x > 0: x -= 1 self.run_and_compare( while_example, [(0, 'call'), (2, 'line'), (3, 'line'), (4, 'line'), (3, 'line'), (4, 'line'), (3, 'line'), (3, 'return')]) def test_16_blank_lines(self): namespace = {} exec("def f():\n" + "\n" * 256 + " pass", namespace) self.run_and_compare( namespace["f"], [(0, 'call'), (257, 'line'), (257, 'return')]) def test_17_none_f_trace(self): # Issue 20041: fix TypeError when f_trace is set to None. def func(): sys._getframe().f_trace = None lineno = 2 self.run_and_compare(func, [(0, 'call'), (1, 'line')]) def test_18_except_with_name(self): def func(): try: try: raise Exception except Exception as e: raise x = "Something" y = "Something" except Exception: pass self.run_and_compare(func, [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (3, 'exception'), (4, 'line'), (5, 'line'), (8, 'line'), (9, 'line'), (9, 'return')]) def test_19_except_with_finally(self): def func(): try: try: raise Exception finally: y = "Something" except Exception: b = 23 self.run_and_compare(func, [(0, 'call'), (1, 'line'), (2, 'line'), (3, 'line'), (3, 'exception'), (5, 'line'), (6, 'line'), (7, 'line'), (7, 'return')]) def test_20_async_for_loop(self): class AsyncIteratorWrapper: def __init__(self, obj): self._it = iter(obj) def __aiter__(self): return self async def __anext__(self): try: return next(self._it) except StopIteration: raise StopAsyncIteration async def doit_async(): async for letter in AsyncIteratorWrapper("abc"): x = letter y = 42 def run(tracer): x = doit_async() try: sys.settrace(tracer) x.send(None) finally: sys.settrace(None) tracer = self.make_tracer() events = [ (0, 'call'), (1, 'line'), (-12, 'call'), (-11, 'line'), (-11, 'return'), (-9, 'call'), (-8, 'line'), (-8, 'return'), (-6, 'call'), (-5, 'line'), (-4, 'line'), (-4, 'return'), (1, 'exception'), (2, 'line'), (1, 'line'), (-6, 'call'), (-5, 'line'), (-4, 'line'), (-4, 'return'), (1, 'exception'), (2, 'line'), (1, 'line'), (-6, 'call'), (-5, 'line'), (-4, 'line'), (-4, 'return'), (1, 'exception'), (2, 'line'), (1, 'line'), (-6, 'call'), (-5, 'line'), (-4, 'line'), (-4, 'exception'), (-3, 'line'), (-2, 'line'), (-2, 'exception'), (-2, 'return'), (1, 'exception'), (3, 'line'), (3, 'return')] try: run(tracer.trace) except Exception: pass self.compare_events(doit_async.__code__.co_firstlineno, tracer.events, events) def test_21_async_for_else(self): async def async_gen(): yield -2 async def async_test(): global a a = 2 async for i in async_gen(): a = 4 else: a = 6 def run(tracer): x = async_test() try: sys.settrace(tracer) x.send(None) finally: sys.settrace(None) tracer = self.make_tracer() events = [ (0, 'call'), (2, 'line'), (3, 'line'), (-3, 'call'), (-2, 'line'), (-2, 'return'), (3, 'exception'), (4, 'line'), (3, 'line'), (-2, 'call'), (-2, 'return'), (3, 'exception'), (6, 'line'), (6, 'return')] try: run(tracer.trace) except Exception: pass self.compare_events(async_test.__code__.co_firstlineno, tracer.events, events) class SkipLineEventsTraceTestCase(TraceTestCase): """Repeat the trace tests, but with per-line events skipped""" def compare_events(self, line_offset, events, expected_events): skip_line_events = [e for e in expected_events if e[1] != 'line'] super().compare_events(line_offset, events, skip_line_events) @staticmethod def make_tracer(): return Tracer(trace_line_events=False) @support.cpython_only class TraceOpcodesTestCase(TraceTestCase): """Repeat the trace tests, but with per-opcodes events enabled""" def compare_events(self, line_offset, events, expected_events): skip_opcode_events = [e for e in events if e[1] != 'opcode'] if len(events) > 1: self.assertLess(len(skip_opcode_events), len(events), msg="No 'opcode' events received by the tracer") super().compare_events(line_offset, skip_opcode_events, expected_events) @staticmethod def make_tracer(): return Tracer(trace_opcode_events=True) class RaisingTraceFuncTestCase(unittest.TestCase): def setUp(self): self.addCleanup(sys.settrace, sys.gettrace()) def trace(self, frame, event, arg): """A trace function that raises an exception in response to a specific trace event.""" if event == self.raiseOnEvent: raise ValueError # just something that isn't RuntimeError else: return self.trace def f(self): """The function to trace; raises an exception if that's the case we're testing, so that the 'exception' trace event fires.""" if self.raiseOnEvent == 'exception': x = 0 y = 1/x else: return 1 def run_test_for_event(self, event): """Tests that an exception raised in response to the given event is handled OK.""" self.raiseOnEvent = event try: for i in range(sys.getrecursionlimit() + 1): sys.settrace(self.trace) try: self.f() except ValueError: pass else: self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") # Test the handling of exceptions raised by each kind of trace event. def test_call(self): self.run_test_for_event('call') def test_line(self): self.run_test_for_event('line') def test_return(self): self.run_test_for_event('return') def test_exception(self): self.run_test_for_event('exception') def test_trash_stack(self): def f(): for i in range(5): print(i) # line tracing will raise an exception at this line def g(frame, why, extra): if (why == 'line' and frame.f_lineno == f.__code__.co_firstlineno + 2): raise RuntimeError("i am crashing") return g sys.settrace(g) try: f() except RuntimeError: # the test is really that this doesn't segfault: import gc gc.collect() else: self.fail("exception not propagated") def test_exception_arguments(self): def f(): x = 0 # this should raise an error x.no_such_attr def g(frame, event, arg): if (event == 'exception'): type, exception, trace = arg self.assertIsInstance(exception, Exception) return g existing = sys.gettrace() try: sys.settrace(g) try: f() except AttributeError: # this is expected pass finally: sys.settrace(existing) # 'Jump' tests: assigning to frame.f_lineno within a trace function # moves the execution position - it's how debuggers implement a Jump # command (aka. "Set next statement"). class JumpTracer: """Defines a trace function that jumps from one place to another.""" def __init__(self, function, jumpFrom, jumpTo, event='line', decorated=False): self.code = function.__code__ self.jumpFrom = jumpFrom self.jumpTo = jumpTo self.event = event self.firstLine = None if decorated else self.code.co_firstlineno self.done = False def trace(self, frame, event, arg): if self.done: return # frame.f_code.co_firstlineno is the first line of the decorator when # 'function' is decorated and the decorator may be written using # multiple physical lines when it is too long. Use the first line # trace event in 'function' to find the first line of 'function'. if (self.firstLine is None and frame.f_code == self.code and event == 'line'): self.firstLine = frame.f_lineno - 1 if (event == self.event and self.firstLine and frame.f_lineno == self.firstLine + self.jumpFrom): f = frame while f is not None and f.f_code != self.code: f = f.f_back if f is not None: # Cope with non-integer self.jumpTo (because of # no_jump_to_non_integers below). try: frame.f_lineno = self.firstLine + self.jumpTo except TypeError: frame.f_lineno = self.jumpTo self.done = True return self.trace # This verifies the line-numbers-must-be-integers rule. def no_jump_to_non_integers(output): try: output.append(2) except ValueError as e: output.append('integer' in str(e)) # This verifies that you can't set f_lineno via _getframe or similar # trickery. def no_jump_without_trace_function(): try: previous_frame = sys._getframe().f_back previous_frame.f_lineno = previous_frame.f_lineno except ValueError as e: # This is the exception we wanted; make sure the error message # talks about trace functions. if 'trace' not in str(e): raise else: # Something's wrong - the expected exception wasn't raised. raise AssertionError("Trace-function-less jump failed to fail") class JumpTestCase(unittest.TestCase): def setUp(self): self.addCleanup(sys.settrace, sys.gettrace()) sys.settrace(None) def compare_jump_output(self, expected, received): if received != expected: self.fail( "Outputs don't match:\n" + "Expected: " + repr(expected) + "\n" + "Received: " + repr(received)) def run_test(self, func, jumpFrom, jumpTo, expected, error=None, event='line', decorated=False): tracer = JumpTracer(func, jumpFrom, jumpTo, event, decorated) sys.settrace(tracer.trace) output = [] if error is None: func(output) else: with self.assertRaisesRegex(*error): func(output) sys.settrace(None) self.compare_jump_output(expected, output) def run_async_test(self, func, jumpFrom, jumpTo, expected, error=None, event='line', decorated=False): tracer = JumpTracer(func, jumpFrom, jumpTo, event, decorated) sys.settrace(tracer.trace) output = [] if error is None: asyncio.run(func(output)) else: with self.assertRaisesRegex(*error): asyncio.run(func(output)) sys.settrace(None) asyncio.set_event_loop_policy(None) self.compare_jump_output(expected, output) def jump_test(jumpFrom, jumpTo, expected, error=None, event='line'): """Decorator that creates a test that makes a jump from one place to another in the following code. """ def decorator(func): @wraps(func) def test(self): self.run_test(func, jumpFrom, jumpTo, expected, error=error, event=event, decorated=True) return test return decorator def async_jump_test(jumpFrom, jumpTo, expected, error=None, event='line'): """Decorator that creates a test that makes a jump from one place to another in the following asynchronous code. """ def decorator(func): @wraps(func) def test(self): self.run_async_test(func, jumpFrom, jumpTo, expected, error=error, event=event, decorated=True) return test return decorator ## The first set of 'jump' tests are for things that are allowed: @jump_test(1, 3, [3]) def test_jump_simple_forwards(output): output.append(1) output.append(2) output.append(3) @jump_test(2, 1, [1, 1, 2]) def test_jump_simple_backwards(output): output.append(1) output.append(2) @jump_test(3, 5, [2, 5]) def test_jump_out_of_block_forwards(output): for i in 1, 2: output.append(2) for j in [3]: # Also tests jumping over a block output.append(4) output.append(5) @jump_test(6, 1, [1, 3, 5, 1, 3, 5, 6, 7]) def test_jump_out_of_block_backwards(output): output.append(1) for i in [1]: output.append(3) for j in [2]: # Also tests jumping over a block output.append(5) output.append(6) output.append(7) @async_jump_test(4, 5, [3, 5]) async def test_jump_out_of_async_for_block_forwards(output): for i in [1]: async for i in asynciter([1, 2]): output.append(3) output.append(4) output.append(5) @async_jump_test(5, 2, [2, 4, 2, 4, 5, 6]) async def test_jump_out_of_async_for_block_backwards(output): for i in [1]: output.append(2) async for i in asynciter([1]): output.append(4) output.append(5) output.append(6) @jump_test(1, 2, [3]) def test_jump_to_codeless_line(output): output.append(1) # Jumping to this line should skip to the next one. output.append(3) @jump_test(2, 2, [1, 2, 3]) def test_jump_to_same_line(output): output.append(1) output.append(2) output.append(3) # Tests jumping within a finally block, and over one. @jump_test(4, 9, [2, 9]) def test_jump_in_nested_finally(output): try: output.append(2) finally: output.append(4) try: output.append(6) finally: output.append(8) output.append(9) @jump_test(6, 7, [2, 7], (ZeroDivisionError, '')) def test_jump_in_nested_finally_2(output): try: output.append(2) 1/0 return finally: output.append(6) output.append(7) output.append(8) @jump_test(6, 11, [2, 11], (ZeroDivisionError, '')) def test_jump_in_nested_finally_3(output): try: output.append(2) 1/0 return finally: output.append(6) try: output.append(8) finally: output.append(10) output.append(11) output.append(12) @jump_test(5, 11, [2, 4], (ValueError, 'unreachable')) def test_no_jump_over_return_try_finally_in_finally_block(output): try: output.append(2) finally: output.append(4) output.append(5) return try: output.append(8) finally: output.append(10) pass output.append(12) @jump_test(3, 4, [1], (ValueError, 'unreachable')) def test_no_jump_infinite_while_loop(output): output.append(1) while True: output.append(3) output.append(4) @jump_test(2, 4, [4, 4]) def test_jump_forwards_into_while_block(output): i = 1 output.append(2) while i <= 2: output.append(4) i += 1 @jump_test(5, 3, [3, 3, 3, 5]) def test_jump_backwards_into_while_block(output): i = 1 while i <= 2: output.append(3) i += 1 output.append(5) @jump_test(2, 3, [1, 3]) def test_jump_forwards_out_of_with_block(output): with tracecontext(output, 1): output.append(2) output.append(3) @async_jump_test(2, 3, [1, 3]) async def test_jump_forwards_out_of_async_with_block(output): async with asynctracecontext(output, 1): output.append(2) output.append(3) @jump_test(3, 1, [1, 2, 1, 2, 3, -2]) def test_jump_backwards_out_of_with_block(output): output.append(1) with tracecontext(output, 2): output.append(3) @async_jump_test(3, 1, [1, 2, 1, 2, 3, -2]) async def test_jump_backwards_out_of_async_with_block(output): output.append(1) async with asynctracecontext(output, 2): output.append(3) @jump_test(2, 5, [5]) def test_jump_forwards_out_of_try_finally_block(output): try: output.append(2) finally: output.append(4) output.append(5) @jump_test(3, 1, [1, 1, 3, 5]) def test_jump_backwards_out_of_try_finally_block(output): output.append(1) try: output.append(3) finally: output.append(5) @jump_test(2, 6, [6]) def test_jump_forwards_out_of_try_except_block(output): try: output.append(2) except: output.append(4) raise output.append(6) @jump_test(3, 1, [1, 1, 3]) def test_jump_backwards_out_of_try_except_block(output): output.append(1) try: output.append(3) except: output.append(5) raise @jump_test(5, 7, [4, 7, 8]) def test_jump_between_except_blocks(output): try: 1/0 except ZeroDivisionError: output.append(4) output.append(5) except FloatingPointError: output.append(7) output.append(8) @jump_test(5, 6, [4, 6, 7]) def test_jump_within_except_block(output): try: 1/0 except: output.append(4) output.append(5) output.append(6) output.append(7) @jump_test(2, 4, [1, 4, 5, -4]) def test_jump_across_with(output): output.append(1) with tracecontext(output, 2): output.append(3) with tracecontext(output, 4): output.append(5) @async_jump_test(2, 4, [1, 4, 5, -4]) async def test_jump_across_async_with(output): output.append(1) async with asynctracecontext(output, 2): output.append(3) async with asynctracecontext(output, 4): output.append(5) @jump_test(4, 5, [1, 3, 5, 6]) def test_jump_out_of_with_block_within_for_block(output): output.append(1) for i in [1]: with tracecontext(output, 3): output.append(4) output.append(5) output.append(6) @async_jump_test(4, 5, [1, 3, 5, 6]) async def test_jump_out_of_async_with_block_within_for_block(output): output.append(1) for i in [1]: async with asynctracecontext(output, 3): output.append(4) output.append(5) output.append(6) @jump_test(4, 5, [1, 2, 3, 5, -2, 6]) def test_jump_out_of_with_block_within_with_block(output): output.append(1) with tracecontext(output, 2): with tracecontext(output, 3): output.append(4) output.append(5) output.append(6) @async_jump_test(4, 5, [1, 2, 3, 5, -2, 6]) async def test_jump_out_of_async_with_block_within_with_block(output): output.append(1) with tracecontext(output, 2): async with asynctracecontext(output, 3): output.append(4) output.append(5) output.append(6) @jump_test(5, 6, [2, 4, 6, 7]) def test_jump_out_of_with_block_within_finally_block(output): try: output.append(2) finally: with tracecontext(output, 4): output.append(5) output.append(6) output.append(7) @async_jump_test(5, 6, [2, 4, 6, 7]) async def test_jump_out_of_async_with_block_within_finally_block(output): try: output.append(2) finally: async with asynctracecontext(output, 4): output.append(5) output.append(6) output.append(7) @jump_test(8, 11, [1, 3, 5, 11, 12]) def test_jump_out_of_complex_nested_blocks(output): output.append(1) for i in [1]: output.append(3) for j in [1, 2]: output.append(5) try: for k in [1, 2]: output.append(8) finally: output.append(10) output.append(11) output.append(12) @jump_test(3, 5, [1, 2, 5]) def test_jump_out_of_with_assignment(output): output.append(1) with tracecontext(output, 2) \ as x: output.append(4) output.append(5) @async_jump_test(3, 5, [1, 2, 5]) async def test_jump_out_of_async_with_assignment(output): output.append(1) async with asynctracecontext(output, 2) \ as x: output.append(4) output.append(5) @jump_test(3, 6, [1, 6, 8, 9]) def test_jump_over_return_in_try_finally_block(output): output.append(1) try: output.append(3) if not output: # always false return output.append(6) finally: output.append(8) output.append(9) @jump_test(5, 8, [1, 3, 8, 10, 11, 13]) def test_jump_over_break_in_try_finally_block(output): output.append(1) while True: output.append(3) try: output.append(5) if not output: # always false break output.append(8) finally: output.append(10) output.append(11) break output.append(13) @jump_test(1, 7, [7, 8]) def test_jump_over_for_block_before_else(output): output.append(1) if not output: # always false for i in [3]: output.append(4) else: output.append(6) output.append(7) output.append(8) @async_jump_test(1, 7, [7, 8]) async def test_jump_over_async_for_block_before_else(output): output.append(1) if not output: # always false async for i in asynciter([3]): output.append(4) else: output.append(6) output.append(7) output.append(8) # The second set of 'jump' tests are for things that are not allowed: @jump_test(2, 3, [1], (ValueError, 'after')) def test_no_jump_too_far_forwards(output): output.append(1) output.append(2) @jump_test(2, -2, [1], (ValueError, 'before')) def test_no_jump_too_far_backwards(output): output.append(1) output.append(2) # Test each kind of 'except' line. @jump_test(2, 3, [4], (ValueError, 'except')) def test_no_jump_to_except_1(output): try: output.append(2) except: output.append(4) raise @jump_test(2, 3, [4], (ValueError, 'except')) def test_no_jump_to_except_2(output): try: output.append(2) except ValueError: output.append(4) raise @jump_test(2, 3, [4], (ValueError, 'except')) def test_no_jump_to_except_3(output): try: output.append(2) except ValueError as e: output.append(4) raise e @jump_test(2, 3, [4], (ValueError, 'except')) def test_no_jump_to_except_4(output): try: output.append(2) except (ValueError, RuntimeError) as e: output.append(4) raise e @jump_test(1, 3, [], (ValueError, 'into')) def test_no_jump_forwards_into_for_block(output): output.append(1) for i in 1, 2: output.append(3) @async_jump_test(1, 3, [], (ValueError, 'into')) async def test_no_jump_forwards_into_async_for_block(output): output.append(1) async for i in asynciter([1, 2]): output.append(3) @jump_test(3, 2, [2, 2], (ValueError, 'into')) def test_no_jump_backwards_into_for_block(output): for i in 1, 2: output.append(2) output.append(3) @async_jump_test(3, 2, [2, 2], (ValueError, 'into')) async def test_no_jump_backwards_into_async_for_block(output): async for i in asynciter([1, 2]): output.append(2) output.append(3) @jump_test(1, 3, [], (ValueError, 'into')) def test_no_jump_forwards_into_with_block(output): output.append(1) with tracecontext(output, 2): output.append(3) @async_jump_test(1, 3, [], (ValueError, 'into')) async def test_no_jump_forwards_into_async_with_block(output): output.append(1) async with asynctracecontext(output, 2): output.append(3) @jump_test(3, 2, [1, 2, -1], (ValueError, 'into')) def test_no_jump_backwards_into_with_block(output): with tracecontext(output, 1): output.append(2) output.append(3) @async_jump_test(3, 2, [1, 2, -1], (ValueError, 'into')) async def test_no_jump_backwards_into_async_with_block(output): async with asynctracecontext(output, 1): output.append(2) output.append(3) @jump_test(1, 3, [], (ValueError, 'into')) def test_no_jump_forwards_into_try_finally_block(output): output.append(1) try: output.append(3) finally: output.append(5) @jump_test(5, 2, [2, 4], (ValueError, 'into')) def test_no_jump_backwards_into_try_finally_block(output): try: output.append(2) finally: output.append(4) output.append(5) @jump_test(1, 3, [], (ValueError, 'into')) def test_no_jump_forwards_into_try_except_block(output): output.append(1) try: output.append(3) except: output.append(5) raise @jump_test(6, 2, [2], (ValueError, 'into')) def test_no_jump_backwards_into_try_except_block(output): try: output.append(2) except: output.append(4) raise output.append(6) # 'except' with a variable creates an implicit finally block @jump_test(5, 7, [4], (ValueError, 'into')) def test_no_jump_between_except_blocks_2(output): try: 1/0 except ZeroDivisionError: output.append(4) output.append(5) except FloatingPointError as e: output.append(7) output.append(8) @jump_test(1, 5, [5]) def test_jump_into_finally_block(output): output.append(1) try: output.append(3) finally: output.append(5) @jump_test(3, 6, [2, 6, 7]) def test_jump_into_finally_block_from_try_block(output): try: output.append(2) output.append(3) finally: # still executed if the jump is failed output.append(5) output.append(6) output.append(7) @jump_test(5, 1, [1, 3, 1, 3, 5]) def test_jump_out_of_finally_block(output): output.append(1) try: output.append(3) finally: output.append(5) @jump_test(1, 5, [], (ValueError, "into an 'except'")) def test_no_jump_into_bare_except_block(output): output.append(1) try: output.append(3) except: output.append(5) @jump_test(1, 5, [], (ValueError, "into an 'except'")) def test_no_jump_into_qualified_except_block(output): output.append(1) try: output.append(3) except Exception: output.append(5) @jump_test(3, 6, [2, 5, 6], (ValueError, "into an 'except'")) def test_no_jump_into_bare_except_block_from_try_block(output): try: output.append(2) output.append(3) except: # executed if the jump is failed output.append(5) output.append(6) raise output.append(8) @jump_test(3, 6, [2], (ValueError, "into an 'except'")) def test_no_jump_into_qualified_except_block_from_try_block(output): try: output.append(2) output.append(3) except ZeroDivisionError: output.append(5) output.append(6) raise output.append(8) @jump_test(7, 1, [1, 3, 6], (ValueError, "out of an 'except'")) def test_no_jump_out_of_bare_except_block(output): output.append(1) try: output.append(3) 1/0 except: output.append(6) output.append(7) @jump_test(7, 1, [1, 3, 6], (ValueError, "out of an 'except'")) def test_no_jump_out_of_qualified_except_block(output): output.append(1) try: output.append(3) 1/0 except Exception: output.append(6) output.append(7) @jump_test(3, 5, [1, 2, 5, -2]) def test_jump_between_with_blocks(output): output.append(1) with tracecontext(output, 2): output.append(3) with tracecontext(output, 4): output.append(5) @async_jump_test(3, 5, [1, 2, 5, -2]) async def test_jump_between_async_with_blocks(output): output.append(1) async with asynctracecontext(output, 2): output.append(3) async with asynctracecontext(output, 4): output.append(5) @jump_test(5, 7, [2, 4], (ValueError, "unreachable")) def test_no_jump_over_return_out_of_finally_block(output): try: output.append(2) finally: output.append(4) output.append(5) return output.append(7) @jump_test(7, 4, [1, 6], (ValueError, 'into')) def test_no_jump_into_for_block_before_else(output): output.append(1) if not output: # always false for i in [3]: output.append(4) else: output.append(6) output.append(7) output.append(8) @async_jump_test(7, 4, [1, 6], (ValueError, 'into')) async def test_no_jump_into_async_for_block_before_else(output): output.append(1) if not output: # always false async for i in asynciter([3]): output.append(4) else: output.append(6) output.append(7) output.append(8) def test_no_jump_to_non_integers(self): self.run_test(no_jump_to_non_integers, 2, "Spam", [True]) def test_no_jump_without_trace_function(self): # Must set sys.settrace(None) in setUp(), else condition is not # triggered. no_jump_without_trace_function() def test_large_function(self): d = {} exec("""def f(output): # line 0 x = 0 # line 1 y = 1 # line 2 ''' # line 3 %s # lines 4-1004 ''' # line 1005 x += 1 # line 1006 output.append(x) # line 1007 return""" % ('\n' * 1000,), d) f = d['f'] self.run_test(f, 2, 1007, [0]) def test_jump_to_firstlineno(self): # This tests that PDB can jump back to the first line in a # file. See issue #1689458. It can only be triggered in a # function call if the function is defined on a single line. code = compile(""" # Comments don't count. output.append(2) # firstlineno is here. output.append(3) output.append(4) """, "<fake module>", "exec") class fake_function: __code__ = code tracer = JumpTracer(fake_function, 2, 0) sys.settrace(tracer.trace) namespace = {"output": []} exec(code, namespace) sys.settrace(None) self.compare_jump_output([2, 3, 2, 3, 4], namespace["output"]) @jump_test(2, 3, [1], event='call', error=(ValueError, "can't jump from" " the 'call' trace event of a new frame")) def test_no_jump_from_call(output): output.append(1) def nested(): output.append(3) nested() output.append(5) @jump_test(2, 1, [1], event='return', error=(ValueError, "can only jump from a 'line' trace event")) def test_no_jump_from_return_event(output): output.append(1) return @jump_test(2, 1, [1], event='exception', error=(ValueError, "can only jump from a 'line' trace event")) def test_no_jump_from_exception_event(output): output.append(1) 1 / 0 @jump_test(3, 2, [2, 5], event='return') def test_jump_from_yield(output): def gen(): output.append(2) yield 3 next(gen()) output.append(5) if __name__ == "__main__": unittest.main()
[+]
..
[-] test_largefile.py
[edit]
[-] test_set.py
[edit]
[-] test_sunau.py
[edit]
[-] test_webbrowser.py
[edit]
[-] test_idle.py
[edit]
[-] keycert.passwd.pem
[edit]
[-] bisect_cmd.py
[edit]
[-] talos-2019-0758.pem
[edit]
[-] audiotest.au
[edit]
[-] test_selectors.py
[edit]
[-] test_pydoc.py
[edit]
[-] test_uu.py
[edit]
[-] ssltests.py
[edit]
[-] test_heapq.py
[edit]
[-] test_parser.py
[edit]
[-] test_bufio.py
[edit]
[-] test_ucn.py
[edit]
[-] sample_doctest_no_doctests.py
[edit]
[-] Sine-1000Hz-300ms.aif
[edit]
[-] test_pkg.py
[edit]
[+]
support
[-] profilee.py
[edit]
[-] test_codecencodings_hk.py
[edit]
[-] pydocfodder.py
[edit]
[-] test_graphlib.py
[edit]
[-] test_raise.py
[edit]
[-] test_genericalias.py
[edit]
[-] curses_tests.py
[edit]
[-] _typed_dict_helper.py
[edit]
[-] test_doctest2.txt
[edit]
[-] test_zipfile.py
[edit]
[-] test_imghdr.py
[edit]
[-] test_type_comments.py
[edit]
[-] bad_getattr.py
[edit]
[-] test_asyncore.py
[edit]
[-] test_script_helper.py
[edit]
[+]
sndhdrdata
[-] test_ossaudiodev.py
[edit]
[-] formatfloat_testcases.txt
[edit]
[-] test_grammar.py
[edit]
[-] test_unicodedata.py
[edit]
[-] test_re.py
[edit]
[-] test_pkgutil.py
[edit]
[-] test_nis.py
[edit]
[-] test__xxsubinterpreters.py
[edit]
[-] nullbytecert.pem
[edit]
[-] pydoc_mod.py
[edit]
[-] test_winconsoleio.py
[edit]
[-] test_abstract_numbers.py
[edit]
[-] test_glob.py
[edit]
[-] test_runpy.py
[edit]
[+]
data
[-] test__opcode.py
[edit]
[+]
cjkencodings
[-] test_descr.py
[edit]
[-] test_codecmaps_hk.py
[edit]
[-] test_future3.py
[edit]
[-] test_regrtest.py
[edit]
[-] test_c_locale_coercion.py
[edit]
[-] test_doctest4.txt
[edit]
[-] test_dis.py
[edit]
[-] test_xml_etree.py
[edit]
[-] ann_module5.py
[edit]
[-] test_sundry.py
[edit]
[-] test_pstats.py
[edit]
[-] test_socketserver.py
[edit]
[-] test_codeop.py
[edit]
[-] test_genericpath.py
[edit]
[-] test_complex.py
[edit]
[-] test_grp.py
[edit]
[-] test_extcall.py
[edit]
[-] test_sys_setprofile.py
[edit]
[-] test_threading.py
[edit]
[-] test_subclassinit.py
[edit]
[-] gdb_sample.py
[edit]
[-] test_wsgiref.py
[edit]
[-] test_fstring.py
[edit]
[-] allsans.pem
[edit]
[-] inspect_fodder2.py
[edit]
[-] dataclass_module_2_str.py
[edit]
[-] test_unary.py
[edit]
[-] test_doctest.py
[edit]
[-] badsyntax_future8.py
[edit]
[-] test_decorators.py
[edit]
[-] _test_multiprocessing.py
[edit]
[-] ieee754.txt
[edit]
[-] badsyntax_future4.py
[edit]
[-] test_property.py
[edit]
[-] test_symbol.py
[edit]
[-] test_rlcompleter.py
[edit]
[-] test_sort.py
[edit]
[-] test_codecencodings_cn.py
[edit]
[-] test_traceback.py
[edit]
[-] test_xmlrpc.py
[edit]
[+]
test_peg_generator
[-] test_posixpath.py
[edit]
[-] test_future5.py
[edit]
[-] test_textwrap.py
[edit]
[-] mapping_tests.py
[edit]
[-] test_gzip.py
[edit]
[-] floating_points.txt
[edit]
[-] test_httpservers.py
[edit]
[-] test_array.py
[edit]
[-] test_structmembers.py
[edit]
[-] test_pwd.py
[edit]
[-] test_calendar.py
[edit]
[-] test_dynamicclassattribute.py
[edit]
[+]
test_tools
[-] dataclass_module_2.py
[edit]
[-] test_codecencodings_kr.py
[edit]
[-] mp_fork_bomb.py
[edit]
[-] ssl_key.pem
[edit]
[-] test_bz2.py
[edit]
[-] test_codeccallbacks.py
[edit]
[-] test_deque.py
[edit]
[-] test_peepholer.py
[edit]
[-] test_multiprocessing_forkserver.py
[edit]
[-] test_unittest.py
[edit]
[-] test_asynchat.py
[edit]
[-] test_struct.py
[edit]
[-] test_osx_env.py
[edit]
[-] test_slice.py
[edit]
[-] test_finalization.py
[edit]
[-] test_pipes.py
[edit]
[-] test_multiprocessing_main_handling.py
[edit]
[-] test_unicode_identifiers.py
[edit]
[-] test_userlist.py
[edit]
[-] datetimetester.py
[edit]
[-] test_fork1.py
[edit]
[-] test_shelve.py
[edit]
[-] test_fcntl.py
[edit]
[-] test_errno.py
[edit]
[-] test_tempfile.py
[edit]
[-] make_ssl_certs.py
[edit]
[-] randv2_64.pck
[edit]
[-] string_tests.py
[edit]
[-] future_test1.py
[edit]
[-] test_pathlib.py
[edit]
[-] nullcert.pem
[edit]
[-] test_wait4.py
[edit]
[-] test_cmd.py
[edit]
[-] test_memoryview.py
[edit]
[+]
audiodata
[-] test_modulefinder.py
[edit]
[-] test_optparse.py
[edit]
[+]
libregrtest
[-] test_bigaddrspace.py
[edit]
[-] test_module.py
[edit]
[-] test_structseq.py
[edit]
[-] test_unicode.py
[edit]
[-] test_positional_only_arg.py
[edit]
[-] test_wave.py
[edit]
[-] test_popen.py
[edit]
[-] test_multiprocessing_fork.py
[edit]
[-] test_context.py
[edit]
[+]
test_email
[-] test_typechecks.py
[edit]
[-] mp_preload.py
[edit]
[-] win_console_handler.py
[edit]
[-] test_capi.py
[edit]
[-] multibytecodec_support.py
[edit]
[-] test_lib2to3.py
[edit]
[-] test_copyreg.py
[edit]
[-] test_operator.py
[edit]
[-] test_urllib.py
[edit]
[-] test_resource.py
[edit]
[-] keycert.pem
[edit]
[-] test_ioctl.py
[edit]
[-] test_getopt.py
[edit]
[+]
eintrdata
[-] badsyntax_future3.py
[edit]
[-] test_buffer.py
[edit]
[-] test_math.py
[edit]
[-] test_thread.py
[edit]
[-] keycert3.pem
[edit]
[-] test_configparser.py
[edit]
[-] test_float.py
[edit]
[-] test_pprint.py
[edit]
[-] test_long.py
[edit]
[-] test_netrc.py
[edit]
[-] test_concurrent_futures.py
[edit]
[-] mime.types
[edit]
[-] memory_watchdog.py
[edit]
[-] test_compare.py
[edit]
[-] test_future.py
[edit]
[-] ann_module.py
[edit]
[-] signalinterproctester.py
[edit]
[-] badsyntax_future9.py
[edit]
[-] test_baseexception.py
[edit]
[-] test_timeout.py
[edit]
[-] lock_tests.py
[edit]
[-] test_urllib2net.py
[edit]
[-] math_testcases.txt
[edit]
[-] test_listcomps.py
[edit]
[-] test_filecmp.py
[edit]
[-] test_unpack_ex.py
[edit]
[-] test_sys.py
[edit]
[-] test_bytes.py
[edit]
[-] selfsigned_pythontestdotnet.pem
[edit]
[-] keycert2.pem
[edit]
[-] test_file_eintr.py
[edit]
[-] exception_hierarchy.txt
[edit]
[-] test_decimal.py
[edit]
[-] test_spwd.py
[edit]
[-] test_aifc.py
[edit]
[-] reperf.py
[edit]
[-] test_userstring.py
[edit]
[-] test_ordered_dict.py
[edit]
[-] ann_module3.py
[edit]
[-] test_threading_local.py
[edit]
[-] test_pdb.py
[edit]
[-] test_smtpnet.py
[edit]
[-] recursion.tar
[edit]
[-] test_zipimport_support.py
[edit]
[+]
test_warnings
[-] test_richcmp.py
[edit]
[-] test_mailcap.py
[edit]
[-] test_linecache.py
[edit]
[-] test_weakref.py
[edit]
[-] test_iter.py
[edit]
[-] test_copy.py
[edit]
[-] test_scope.py
[edit]
[-] __main__.py
[edit]
[-] test_crypt.py
[edit]
[-] test_clinic.py
[edit]
[-] tokenize_tests-utf8-coding-cookie-and-utf8-bom-sig.txt
[edit]
[-] test_gdb.py
[edit]
[-] test_audioop.py
[edit]
[-] empty.vbs
[edit]
[-] test_with.py
[edit]
[-] inspect_fodder.py
[edit]
[-] test_iterlen.py
[edit]
[-] seq_tests.py
[edit]
[-] test_colorsys.py
[edit]
[-] test_openpty.py
[edit]
[-] test_opcodes.py
[edit]
[-] test_sysconfig.py
[edit]
[-] test_quopri.py
[edit]
[-] test_smtpd.py
[edit]
[-] idnsans.pem
[edit]
[-] test_site.py
[edit]
[-] test_strptime.py
[edit]
[-] test_code.py
[edit]
[-] mock_socket.py
[edit]
[-] test_genexps.py
[edit]
[-] badsyntax_future10.py
[edit]
[-] tokenize_tests-no-coding-cookie-and-utf8-bom-sig-only.txt
[edit]
[-] test_epoll.py
[edit]
[-] test_itertools.py
[edit]
[-] test_cprofile.py
[edit]
[-] test_uuid.py
[edit]
[-] test_lltrace.py
[edit]
[-] test_zipfile64.py
[edit]
[-] test_tcl.py
[edit]
[-] test_cgitb.py
[edit]
[-] test_datetime.py
[edit]
[-] test_doctest3.txt
[edit]
[-] test_pulldom.py
[edit]
[+]
ziptestdata
[-] future_test2.py
[edit]
[-] test_winreg.py
[edit]
[-] test_atexit.py
[edit]
[-] test_ttk_textonly.py
[edit]
[-] test_bigmem.py
[edit]
[-] ffdh3072.pem
[edit]
[-] test_charmapcodec.py
[edit]
[-] test_utf8_mode.py
[edit]
[-] test_zipimport.py
[edit]
[-] test_html.py
[edit]
[-] test_robotparser.py
[edit]
[-] test_types.py
[edit]
[-] test_codecencodings_iso2022.py
[edit]
[-] test_bisect.py
[edit]
[-] test_class.py
[edit]
[-] test_dictviews.py
[edit]
[-] test_mailbox.py
[edit]
[-] test_httplib.py
[edit]
[-] test_bool.py
[edit]
[-] test_tarfile.py
[edit]
[-] test_io.py
[edit]
[-] test_enum.py
[edit]
[-] test_fileio.py
[edit]
[-] badsyntax_3131.py
[edit]
[-] test_asdl_parser.py
[edit]
[-] keycertecc.pem
[edit]
[-] test_code_module.py
[edit]
[-] test_descrtut.py
[edit]
[-] autotest.py
[edit]
[-] test_poplib.py
[edit]
[-] test_compileall.py
[edit]
[-] test_frame.py
[edit]
[-] list_tests.py
[edit]
[+]
test_zoneinfo
[-] coding20731.py
[edit]
[-] test_imp.py
[edit]
[+]
test_asyncio
[-] test_pyexpat.py
[edit]
[-] test_pickle.py
[edit]
[-] randv3.pck
[edit]
[-] bad_coding2.py
[edit]
[-] test__osx_support.py
[edit]
[-] test_setcomps.py
[edit]
[-] fork_wait.py
[edit]
[-] test_posix.py
[edit]
[-] test_enumerate.py
[edit]
[-] test_eof.py
[edit]
[+]
__pycache__
[-] tokenize_tests-utf8-coding-cookie-and-no-utf8-bom-sig.txt
[edit]
[-] pythoninfo.py
[edit]
[-] pickletester.py
[edit]
[-] time_hashlib.py
[edit]
[-] test_shlex.py
[edit]
[-] test_dict_version.py
[edit]
[-] test_statistics.py
[edit]
[-] test_ntpath.py
[edit]
[-] test_mmap.py
[edit]
[-] test_difflib.py
[edit]
[-] tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
[edit]
[-] test_curses.py
[edit]
[-] test_codecencodings_jp.py
[edit]
[-] test_tix.py
[edit]
[-] test_timeit.py
[edit]
[-] test_memoryio.py
[edit]
[-] test_ftplib.py
[edit]
[-] test_gettext.py
[edit]
[-] clinic.test
[edit]
[-] test_distutils.py
[edit]
[-] test_support.py
[edit]
[-] test_augassign.py
[edit]
[-] test_imaplib.py
[edit]
[-] test_sndhdr.py
[edit]
[-] mailcap.txt
[edit]
[-] test_cmath.py
[edit]
[-] test_urllib_response.py
[edit]
[-] ssl_key.passwd.pem
[edit]
[-] test_tokenize.py
[edit]
[-] test_format.py
[edit]
[-] test_dynamic.py
[edit]
[-] test_global.py
[edit]
[-] test_os.py
[edit]
[-] badcert.pem
[edit]
[-] test_secrets.py
[edit]
[-] test_pyclbr.py
[edit]
[-] test_picklebuffer.py
[edit]
[-] badkey.pem
[edit]
[-] test_dbm.py
[edit]
[-] test_nntplib.py
[edit]
[-] test_flufl.py
[edit]
[-] test_eintr.py
[edit]
[-] test_multiprocessing_spawn.py
[edit]
[-] test_xmlrpc_net.py
[edit]
[-] tf_inherit_check.py
[edit]
[-] nokia.pem
[edit]
[-] test_audit.py
[edit]
[-] final_b.py
[edit]
[-] tokenize_tests.txt
[edit]
[-] revocation.crl
[edit]
[+]
subprocessdata
[-] test_codecmaps_tw.py
[edit]
[-] test_file.py
[edit]
[-] cmath_testcases.txt
[edit]
[-] test_signal.py
[edit]
[-] test_codecmaps_jp.py
[edit]
[-] test_int.py
[edit]
[-] test_sqlite.py
[edit]
[-] test_http_cookies.py
[edit]
[-] sgml_input.html
[edit]
[-] badsyntax_future5.py
[edit]
[-] test_unicode_file_functions.py
[edit]
[-] re_tests.py
[edit]
[-] mod_generics_cache.py
[edit]
[-] test_repl.py
[edit]
[-] test_faulthandler.py
[edit]
[-] test_telnetlib.py
[edit]
[-] test_exceptions.py
[edit]
[-] test_builtin.py
[edit]
[-] test_frozen.py
[edit]
[-] sortperf.py
[edit]
[-] test_named_expressions.py
[edit]
[-] test_codecs.py
[edit]
[-] test_zipapp.py
[edit]
[-] test_dictcomps.py
[edit]
[-] test___future__.py
[edit]
[+]
dtracedata
[-] dataclass_module_1.py
[edit]
[-] test_binascii.py
[edit]
[-] test___all__.py
[edit]
[-] testtar.tar
[edit]
[+]
test_json
[-] secp384r1.pem
[edit]
[-] test_locale.py
[edit]
[-] cfgparser.2
[edit]
[-] test_trace.py
[edit]
[-] test_binop.py
[edit]
[-] test_threadsignals.py
[edit]
[-] test_fractions.py
[edit]
[-] test_univnewlines.py
[edit]
[-] test_argparse.py
[edit]
[-] zipdir.zip
[edit]
[-] test_marshal.py
[edit]
[-] test_strtod.py
[edit]
[-] test_hmac.py
[edit]
[-] test_random.py
[edit]
[-] test_urllib2.py
[edit]
[-] test_syntax.py
[edit]
[-] test_compile.py
[edit]
[-] xmltests.py
[edit]
[-] test_tracemalloc.py
[edit]
[-] final_a.py
[edit]
[-] test_functools.py
[edit]
[+]
capath
[-] pyclbr_input.py
[edit]
[-] test_yield_from.py
[edit]
[-] badsyntax_future6.py
[edit]
[-] test_xml_dom_minicompat.py
[edit]
[-] test_bdb.py
[edit]
[-] test_ast.py
[edit]
[-] test_ensurepip.py
[edit]
[-] test_threadedtempfile.py
[edit]
[-] test_keyword.py
[edit]
[-] test_strftime.py
[edit]
[-] test_logging.py
[edit]
[+]
decimaltestdata
[-] test_dataclasses.py
[edit]
[-] test_lzma.py
[edit]
[-] test_startfile.py
[edit]
[-] test_venv.py
[edit]
[-] test_zlib.py
[edit]
[-] test_contains.py
[edit]
[-] test_docxmlrpc.py
[edit]
[-] test_stringprep.py
[edit]
[-] test_defaultdict.py
[edit]
[-] audiotests.py
[edit]
[-] test_ctypes.py
[edit]
[-] imp_dummy.py
[edit]
[-] relimport.py
[edit]
[-] test_codecencodings_tw.py
[edit]
[-] test_genericclass.py
[edit]
[-] cfgparser.3
[edit]
[-] dis_module.py
[edit]
[-] test_cgi.py
[edit]
[-] pycakey.pem
[edit]
[-] test_xxtestfuzz.py
[edit]
[-] test_winsound.py
[edit]
[-] test_unicode_file.py
[edit]
[-] test_msilib.py
[edit]
[-] __init__.py
[edit]
[-] pycacert.pem
[edit]
[-] test_dbm_ndbm.py
[edit]
[+]
tracedmodules
[-] test_cmd_line.py
[edit]
[-] good_getattr.py
[edit]
[+]
imghdrdata
[-] test_kqueue.py
[edit]
[-] test_call.py
[edit]
[-] bad_getattr3.py
[edit]
[-] test_abc.py
[edit]
[-] test_xdrlib.py
[edit]
[-] test_generator_stop.py
[edit]
[-] test_hash.py
[edit]
[-] test_urlparse.py
[edit]
[-] test_sax.py
[edit]
[-] test_dict.py
[edit]
[-] test_reprlib.py
[edit]
[-] pstats.pck
[edit]
[-] test_list.py
[edit]
[-] ann_module6.py
[edit]
[-] test_utf8source.py
[edit]
[-] test_symtable.py
[edit]
[-] test_ttk_guionly.py
[edit]
[-] test_cmd_line_script.py
[edit]
[-] doctest_aliases.py
[edit]
[-] test_http_cookiejar.py
[edit]
[-] test_turtle.py
[edit]
[-] keycert4.pem
[edit]
[-] ann_module2.py
[edit]
[-] test_py_compile.py
[edit]
[-] test_super.py
[edit]
[+]
test_import
[-] test_binhex.py
[edit]
[-] test_coroutines.py
[edit]
[-] test_contextlib_async.py
[edit]
[+]
encoded_modules
[-] test_ipaddress.py
[edit]
[-] test_platform.py
[edit]
[-] test_longexp.py
[edit]
[-] test_codecmaps_cn.py
[edit]
[-] test_unpack.py
[edit]
[-] test_doctest.txt
[edit]
[-] test_socket.py
[edit]
[-] test_difflib_expect.html
[edit]
[-] test_check_c_globals.py
[edit]
[-] test_sys_settrace.py
[edit]
[-] test_urllib2_localnet.py
[edit]
[+]
xmltestdata
[-] test_dtrace.py
[edit]
[-] sample_doctest.py
[edit]
[-] sample_doctest_no_docstrings.py
[edit]
[-] test_csv.py
[edit]
[-] testcodec.py
[edit]
[-] badsyntax_future7.py
[edit]
[-] test_htmlparser.py
[edit]
[-] bad_coding.py
[edit]
[-] zip_cp437_header.zip
[edit]
[-] test_tabnanny.py
[edit]
[-] double_const.py
[edit]
[-] test_urllibnet.py
[edit]
[-] test_asyncgen.py
[edit]
[-] test_time.py
[edit]
[-] test_pow.py
[edit]
[-] test_tk.py
[edit]
[-] test_profile.py
[edit]
[-] test_smtplib.py
[edit]
[-] test_stat.py
[edit]
[-] test_generators.py
[edit]
[-] test_isinstance.py
[edit]
[-] test_index.py
[edit]
[-] test_int_literal.py
[edit]
[-] test_string.py
[edit]
[-] test_keywordonlyarg.py
[edit]
[-] test_fileinput.py
[edit]
[-] test_weakset.py
[edit]
[-] ssl_servers.py
[edit]
[-] test_sched.py
[edit]
[-] test_queue.py
[edit]
[-] test_unparse.py
[edit]
[-] test_typing.py
[edit]
[-] test_poll.py
[edit]
[-] test_mimetypes.py
[edit]
[-] test_xml_etree_c.py
[edit]
[-] test__locale.py
[edit]
[-] cfgparser.1
[edit]
[-] test_select.py
[edit]
[-] test_ssl.py
[edit]
[-] test_print.py
[edit]
[-] test_minidom.py
[edit]
[-] test_contextlib.py
[edit]
[-] test_exception_variations.py
[edit]
[-] bad_getattr2.py
[edit]
[-] test_shutil.py
[edit]
[-] test_devpoll.py
[edit]
[-] test_doctest2.py
[edit]
[-] test_source_encoding.py
[edit]
[-] audit-tests.py
[edit]
[-] test_getpass.py
[edit]
[-] test_fnmatch.py
[edit]
[-] test_plistlib.py
[edit]
[-] test_crashers.py
[edit]
[-] test_future4.py
[edit]
[-] test_getargs2.py
[edit]
[-] test_gc.py
[edit]
[-] badsyntax_pep3120.py
[edit]
[-] test_userdict.py
[edit]
[-] dataclass_module_1_str.py
[edit]
[-] test_inspect.py
[edit]
[-] test_codecmaps_kr.py
[edit]
[-] test_tuple.py
[edit]
[-] test_readline.py
[edit]
[-] dataclass_textanno.py
[edit]
[-] test_dbm_dumb.py
[edit]
[+]
test_importlib
[-] test_hashlib.py
[edit]
[-] test_syslog.py
[edit]
[-] test_pty.py
[edit]
[-] test_pickletools.py
[edit]
[-] regrtest.py
[edit]
[-] test_wait3.py
[edit]
[-] test_collections.py
[edit]
[-] test_peg_parser.py
[edit]
[-] test_string_literals.py
[edit]
[-] test_multibytecodec.py
[edit]
[-] test_range.py
[edit]
[-] test_exception_hierarchy.py
[edit]
[-] randv2_32.pck
[edit]
[-] nosan.pem
[edit]
[-] test_metaclass.py
[edit]
[-] test_numeric_tower.py
[edit]
[-] test_subprocess.py
[edit]
[-] test_embed.py
[edit]
[-] ssl_cert.pem
[edit]
[-] test_dbm_gnu.py
[edit]
[-] test_base64.py
[edit]
[-] test_funcattrs.py
[edit]