aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-02-05 15:26:53 -0500
committerDylan Baker <dylan@pnwbakers.com>2021-02-05 16:33:23 -0800
commitccd0cd316325a03f842f3213ad6d13ee12f713ad (patch)
tree7f909f2ae90c3f03880d07aba38f560d84625fd2 /run_unittests.py
parent67e99bb4edf3e4d423247a2f60b46f1214b52889 (diff)
downloadmeson-ccd0cd316325a03f842f3213ad6d13ee12f713ad.zip
meson-ccd0cd316325a03f842f3213ad6d13ee12f713ad.tar.gz
meson-ccd0cd316325a03f842f3213ad6d13ee12f713ad.tar.bz2
run_unittests: fix misc lint errors due to whitespace or unused imports/args
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 5ac2d1a..9cc36fb 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -56,7 +56,7 @@ from mesonbuild.mesonlib import (
BuildDirLock, LibType, MachineChoice, PerMachine, Version, is_windows,
is_osx, is_cygwin, is_dragonflybsd, is_openbsd, is_haiku, is_sunos,
windows_proof_rmtree, python_command, version_compare, split_args,
- quote_arg, relpath, is_linux, git, GIT
+ quote_arg, relpath, is_linux, git
)
from mesonbuild.environment import detect_ninja
from mesonbuild.mesonlib import MesonException, EnvironmentException, OptionKey
@@ -336,7 +336,6 @@ class InternalTests(unittest.TestCase):
self.assertEqual(searchfunc('2016.oops 1.2.3'), '1.2.3')
self.assertEqual(searchfunc('2016.x'), 'unknown version')
-
def test_mode_symbolic_to_bits(self):
modefunc = mesonbuild.mesonlib.FileMode.perms_s_to_bits
self.assertEqual(modefunc('---------'), 0)
@@ -1459,6 +1458,7 @@ class DataTests(unittest.TestCase):
res = re.search(r'syn keyword mesonBuiltin(\s+\\\s\w+)+', f.read(), re.MULTILINE)
defined = set([a.strip() for a in res.group().split('\\')][1:])
self.assertEqual(defined, set(chain(interp.funcs.keys(), interp.builtin.keys())))
+
def test_all_functions_defined_in_ast_interpreter(self):
'''
Ensure that the all functions defined in the Interpreter are also defined
@@ -1490,7 +1490,6 @@ class DataTests(unittest.TestCase):
for p in i.iterdir():
data_files += [(p.relative_to(mesonbuild_dir).as_posix(), hashlib.sha256(p.read_bytes()).hexdigest())]
- from pprint import pprint
current_files = set(mesondata.keys())
scanned_files = set([x[0] for x in data_files])
@@ -2762,7 +2761,7 @@ class AllPlatformTests(BasePlatformTests):
for env_var in ['CPPFLAGS', 'CFLAGS']:
env = {}
env[env_var] = '-D{}="{}"'.format(define, value)
- env['LDFLAGS'] = '-DMESON_FAIL_VALUE=cflags-read'.format(define)
+ env['LDFLAGS'] = '-DMESON_FAIL_VALUE=cflags-read'
self.init(testdir, extra_args=['-D{}={}'.format(define, value)], override_envvars=env)
def test_custom_target_exe_data_deterministic(self):
@@ -2927,7 +2926,6 @@ class AllPlatformTests(BasePlatformTests):
except FileNotFoundError:
return False
-
def test_dist_hg(self):
if not self.has_working_hg():
raise unittest.SkipTest('Mercurial not found or broken.')