aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-06-23 01:00:59 +0300
committerGitHub <noreply@github.com>2021-06-23 01:00:59 +0300
commit6e0a0fd1da979acb25c1b0d7397e378d613953ba (patch)
treebbbfe309e7ee2987f3634e91a151891da0e057cd /run_unittests.py
parent0e5f88baf4d08c98a8d140829dbe3f7db626ca8a (diff)
parent132420a05901deb8be5524c17fde7031d5d9b8a1 (diff)
downloadmeson-6e0a0fd1da979acb25c1b0d7397e378d613953ba.zip
meson-6e0a0fd1da979acb25c1b0d7397e378d613953ba.tar.gz
meson-6e0a0fd1da979acb25c1b0d7397e378d613953ba.tar.bz2
Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functions
Add annotations for the various install_* functions
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 13149ce..7f74e91 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1698,6 +1698,18 @@ class InternalTests(unittest.TestCase):
_(None, mock.Mock(subproject=''), [], {'mode': 'since'})
self.assertRegex(out.getvalue(), r"""WARNING:.Project targeting '1.0'.*introduced in '1.1': "testfunc" keyword argument "mode" value "since".*""")
+ def test_typed_kwarg_evolve(self) -> None:
+ k = KwargInfo('foo', str, required=True, default='foo')
+ v = k.evolve(default='bar')
+ self.assertEqual(k.name, 'foo')
+ self.assertEqual(k.name, v.name)
+ self.assertEqual(k.types, str)
+ self.assertEqual(k.types, v.types)
+ self.assertEqual(k.required, True)
+ self.assertEqual(k.required, v.required)
+ self.assertEqual(k.default, 'foo')
+ self.assertEqual(v.default, 'bar')
+
@unittest.skipIf(is_tarball(), 'Skipping because this is a tarball release')
class DataTests(unittest.TestCase):