diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-06-23 01:00:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 01:00:59 +0300 |
commit | 6e0a0fd1da979acb25c1b0d7397e378d613953ba (patch) | |
tree | bbbfe309e7ee2987f3634e91a151891da0e057cd /run_unittests.py | |
parent | 0e5f88baf4d08c98a8d140829dbe3f7db626ca8a (diff) | |
parent | 132420a05901deb8be5524c17fde7031d5d9b8a1 (diff) | |
download | meson-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-x | run_unittests.py | 12 |
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): |