diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-12-06 14:27:44 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-01-18 17:53:29 -0500 |
commit | 6b272973e07596b48ac95e4adaa0df9118b73b00 (patch) | |
tree | d8ea4b3d56e756d5252bd512018572b48862da4a /unittests | |
parent | ab9c0c17356eb05078f1ae5d876638b4620d0148 (diff) | |
download | meson-6b272973e07596b48ac95e4adaa0df9118b73b00.zip meson-6b272973e07596b48ac95e4adaa0df9118b73b00.tar.gz meson-6b272973e07596b48ac95e4adaa0df9118b73b00.tar.bz2 |
dependencies: don't pass kwargs from get_pkgconfig_variable
This is a layering violation, we're relying on the way the interpreter
handles keyword arguments. Instead, pass them as free variables,
destructuring in the interpreter
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/linuxliketests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index ade489d..90db4ca 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -148,18 +148,18 @@ class LinuxlikeTests(BasePlatformTests): self.assertTrue(foo_dep.found()) self.assertEqual(foo_dep.get_version(), '1.0') self.assertIn('-lfoo', foo_dep.get_link_args()) - self.assertEqual(foo_dep.get_pkgconfig_variable('foo', {}), 'bar') - self.assertPathEqual(foo_dep.get_pkgconfig_variable('datadir', {}), '/usr/data') + self.assertEqual(foo_dep.get_pkgconfig_variable('foo', [], None), 'bar') + self.assertPathEqual(foo_dep.get_pkgconfig_variable('datadir', [], None), '/usr/data') libhello_nolib = PkgConfigDependency('libhello_nolib', env, kwargs) self.assertTrue(libhello_nolib.found()) self.assertEqual(libhello_nolib.get_link_args(), []) self.assertEqual(libhello_nolib.get_compile_args(), []) - self.assertEqual(libhello_nolib.get_pkgconfig_variable('foo', {}), 'bar') - self.assertEqual(libhello_nolib.get_pkgconfig_variable('prefix', {}), self.prefix) + self.assertEqual(libhello_nolib.get_pkgconfig_variable('foo', [], None), 'bar') + self.assertEqual(libhello_nolib.get_pkgconfig_variable('prefix', [], None), self.prefix) if version_compare(libhello_nolib.check_pkgconfig(libhello_nolib.pkgbin),">=0.29.1"): - self.assertEqual(libhello_nolib.get_pkgconfig_variable('escaped_var', {}), r'hello\ world') - self.assertEqual(libhello_nolib.get_pkgconfig_variable('unescaped_var', {}), 'hello world') + self.assertEqual(libhello_nolib.get_pkgconfig_variable('escaped_var', [], None), r'hello\ world') + self.assertEqual(libhello_nolib.get_pkgconfig_variable('unescaped_var', [], None), 'hello world') cc = detect_c_compiler(env, MachineChoice.HOST) if cc.get_id() in {'gcc', 'clang'}: |