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)
| 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. |
no outgoing calls
no test coverage detected