-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_tracer_failing.py
executable file
·27 lines (23 loc) · 1.03 KB
/
test_tracer_failing.py
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
# Automatically generated by Pynguin.
import unittest
import tracewrapper as module0
class test(unittest.TestCase):
def test_isstatic(self):
inst1 = module0.tracewrapper()
assert inst1 is not None
inst2 = module0.tracewrapper()
assert inst2 is not None
inst1.add_function_exclusion("test")
assert inst2.function_excluded("test") is True, "Tracer Object should be static (functionexclusions)"
inst1.add(show_trace1)
assert inst2.functions[0] is inst1.functions[0], "Tracer Object should be static (functions)"
inst1.add_module_exclusion("test")
assert inst2.module_excluded("test"), "Tracer Object should be static (moduleexclusions)"
inst1.add_event_filter(show_trace1,"call")
assert inst2.event_filter(show_trace1,"call"), "Tracer Object should be static (filters)"
#dependencies
def show_trace1(frame, event, arg):
code = frame.f_code
offset = frame.f_lasti
print(f"Trace1 | {code.co_name}\n", end=' ')
return show_trace1