MCPcopy Index your code
hub / github.com/python/cpython / configure_func

Method configure_func

Lib/test/test_dynamic.py:14–27  ·  view source on GitHub ↗

Perform TestCase-specific configuration on a function before testing. By default, this does nothing. Example usage: spinning a function so that a JIT will optimize it. Subclasses should override this as needed. Args: func: function to configure. *arg

(self, func, *args)

Source from the content-addressed store, hash-verified

12 """Test all the ways that we can change/shadow globals/builtins."""
13
14 def configure_func(self, func, *args):
15 """Perform TestCase-specific configuration on a function before testing.
16
17 By default, this does nothing. Example usage: spinning a function so
18 that a JIT will optimize it. Subclasses should override this as needed.
19
20 Args:
21 func: function to configure.
22 *args: any arguments that should be passed to func, if calling it.
23
24 Returns:
25 Nothing. Work will be performed on func in-place.
26 """
27 pass
28
29 def test_globals_shadow_builtins(self):
30 # Modify globals() to shadow an entry in builtins.

Calls

no outgoing calls

Tested by

no test coverage detected