diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-12-02 13:45:28 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-12-02 16:39:06 -0800 |
commit | 71e3fac5af1027f88a48c0beb78c3994cea57629 (patch) | |
tree | 9d4acb59224029af70b6965f73b47628af329243 | |
parent | 2450cd6a9fdc51895dcce461312768a485959b7e (diff) | |
download | meson-71e3fac5af1027f88a48c0beb78c3994cea57629.zip meson-71e3fac5af1027f88a48c0beb78c3994cea57629.tar.gz meson-71e3fac5af1027f88a48c0beb78c3994cea57629.tar.bz2 |
run_unittests: remove unused PatchModule class
-rwxr-xr-x | run_unittests.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/run_unittests.py b/run_unittests.py index bf67729..74e5803 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -290,26 +290,6 @@ def no_pkgconfig(): shutil.which = old_which ExternalProgram._search = old_search -class PatchModule: - ''' - Fancy monkey-patching! Whee! Can't use mock.patch because it only - patches in the local namespace. - ''' - - def __init__(self, func, name, impl): - self.func = func - assert(isinstance(name, str)) - self.func_name = name - self.old_impl = None - self.new_impl = impl - - def __enter__(self): - self.old_impl = self.func - exec('{} = self.new_impl'.format(self.func_name)) - - def __exit__(self, *args): - exec('{} = self.old_impl'.format(self.func_name)) - class InternalTests(unittest.TestCase): @@ -5743,6 +5723,7 @@ c = ['{0}'] self.build() self.run_tests() + def should_run_cross_arm_tests(): return shutil.which('arm-linux-gnueabihf-gcc') and not platform.machine().lower().startswith('arm') |