MCPcopy
hub / github.com/evalplus/evalplus / test_entrypoint_basic

Function test_entrypoint_basic

tests/test_treesitter_sanitizer.py:98–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96
97
98def test_entrypoint_basic():
99 icode = r"""Following is the code snippet:
100```python
101import numpy as np
102from numpy import sin, cos
103
104def f(x):
105 return np.tan(x)
106
107def g(x):
108 return cos(f(x))
109
110def g(x):
111 return sin(f(x))
112
113def c(x):
114 return 0
115
116assert g(0) == 1
117```
118"""
119 assert (
120 sanitize(icode, "g")
121 == r"""import numpy as np
122from numpy import sin, cos
123def f(x):
124 return np.tan(x)
125def g(x):
126 return cos(f(x))"""
127 )
128
129
130def test_entrypoint_chain():

Callers

nothing calls this directly

Calls 1

sanitizeFunction · 0.90

Tested by

no test coverage detected