diff options
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/allplatformstests.py | 4 | ||||
| -rw-r--r-- | unittests/datatests.py | 4 | ||||
| -rw-r--r-- | unittests/internaltests.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 5ae33fef3..707fc1d07 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -1339,7 +1339,7 @@ class AllPlatformTests(BasePlatformTests): tar = tarfile.open(xz_distfile, "r:xz") # [ignore encoding] self.assertEqual(sorted(['samerepo-1.0', 'samerepo-1.0/meson.build']), - sorted([i.name for i in tar])) + sorted(i.name for i in tar)) def test_rpath_uses_ORIGIN(self): ''' @@ -2625,7 +2625,7 @@ class AllPlatformTests(BasePlatformTests): def assertKeyTypes(key_type_list, obj, strict: bool = True): for i in key_type_list: if isinstance(i[1], (list, tuple)) and None in i[1]: - i = (i[0], tuple([x for x in i[1] if x is not None])) + i = (i[0], tuple(x for x in i[1] if x is not None)) if i[0] not in obj or obj[i[0]] is None: continue self.assertIn(i[0], obj) diff --git a/unittests/datatests.py b/unittests/datatests.py index 6f4f4215e..b82ff1c87 100644 --- a/unittests/datatests.py +++ b/unittests/datatests.py @@ -145,8 +145,8 @@ class DataTests(unittest.TestCase): found_entries |= options self.assertEqual(found_entries, { - *[str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS], - *[str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS_PER_MACHINE], + *(str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS), + *(str(k) for k in mesonbuild.coredata.BUILTIN_OPTIONS_PER_MACHINE), }) # Check that `buildtype` table inside `Core options` matches how diff --git a/unittests/internaltests.py b/unittests/internaltests.py index a6f1ca523..957f18069 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -509,8 +509,8 @@ class InternalTests(unittest.TestCase): def _test_all_naming(self, cc, env, patterns, platform): shr = patterns[platform]['shared'] stc = patterns[platform]['static'] - shrstc = shr + tuple([x for x in stc if x not in shr]) - stcshr = stc + tuple([x for x in shr if x not in stc]) + shrstc = shr + tuple(x for x in stc if x not in shr) + stcshr = stc + tuple(x for x in shr if x not in stc) p = cc.get_library_naming(env, LibType.SHARED) self.assertEqual(p, shr) p = cc.get_library_naming(env, LibType.STATIC) |
