summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorspaette <spaette@users.noreply.github.com>2024-09-11 13:05:04 -0500
committerDylan Baker <dylan@pnwbakers.com>2024-09-11 15:51:04 -0700
commit4179996fefd272cc0c893b88ad17c010fa037768 (patch)
treea5f7f8ff03bb5b6d39556331d4c2e163f7718c14 /unittests
parent3aedec5b34c586b9c3a16be17d2fda353bf5fff1 (diff)
downloadmeson-4179996fefd272cc0c893b88ad17c010fa037768.tar.gz
Fix typos
Diffstat (limited to 'unittests')
-rw-r--r--unittests/baseplatformtests.py4
-rw-r--r--unittests/internaltests.py16
-rw-r--r--unittests/machinefiletests.py10
3 files changed, 15 insertions, 15 deletions
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py
index 72ebeafe7..377032192 100644
--- a/unittests/baseplatformtests.py
+++ b/unittests/baseplatformtests.py
@@ -496,13 +496,13 @@ class BasePlatformTests(TestCase):
ensures that the copied tree is deleted after running.
- :param srcdir: The locaiton of the source tree to copy
+ :param srcdir: The location of the source tree to copy
:return: The location of the copy
"""
dest = tempfile.mkdtemp()
self.addCleanup(windows_proof_rmtree, dest)
- # shutil.copytree expects the destinatin directory to not exist, Once
+ # shutil.copytree expects the destination directory to not exist, Once
# python 3.8 is required the `dirs_exist_ok` parameter negates the need
# for this
dest = os.path.join(dest, 'subdir')
diff --git a/unittests/internaltests.py b/unittests/internaltests.py
index fa0e440d3..310b4f680 100644
--- a/unittests/internaltests.py
+++ b/unittests/internaltests.py
@@ -1348,8 +1348,8 @@ class InternalTests(unittest.TestCase):
def test_typed_kwarg_since(self) -> None:
@typed_kwargs(
'testfunc',
- KwargInfo('input', str, since='1.0', since_message='Its awesome, use it',
- deprecated='2.0', deprecated_message='Its terrible, dont use it')
+ KwargInfo('input', str, since='1.0', since_message='It\'s awesome, use it',
+ deprecated='2.0', deprecated_message='It\'s terrible, don\'t use it')
)
def _(obj, node, args: T.Tuple, kwargs: T.Dict[str, str]) -> None:
self.assertIsInstance(kwargs['input'], str)
@@ -1360,8 +1360,8 @@ class InternalTests(unittest.TestCase):
mock.patch('mesonbuild.mesonlib.project_meson_versions', {'': '0.1'}):
# With Meson 0.1 it should trigger the "introduced" warning but not the "deprecated" warning
_(None, mock.Mock(subproject=''), [], {'input': 'foo'})
- self.assertRegex(out.getvalue(), r'WARNING:.*introduced.*input arg in testfunc. Its awesome, use it')
- self.assertNotRegex(out.getvalue(), r'WARNING:.*deprecated.*input arg in testfunc. Its terrible, dont use it')
+ self.assertRegex(out.getvalue(), r'WARNING:.*introduced.*input arg in testfunc. It\'s awesome, use it')
+ self.assertNotRegex(out.getvalue(), r'WARNING:.*deprecated.*input arg in testfunc. It\'s terrible, don\'t use it')
with self.subTest('no warnings should be triggered'), \
mock.patch('sys.stdout', io.StringIO()) as out, \
@@ -1375,8 +1375,8 @@ class InternalTests(unittest.TestCase):
mock.patch('mesonbuild.mesonlib.project_meson_versions', {'': '2.0'}):
# With Meson 2.0 it should trigger the "deprecated" warning but not the "introduced" warning
_(None, mock.Mock(subproject=''), [], {'input': 'foo'})
- self.assertRegex(out.getvalue(), r'WARNING:.*deprecated.*input arg in testfunc. Its terrible, dont use it')
- self.assertNotRegex(out.getvalue(), r'WARNING:.*introduced.*input arg in testfunc. Its awesome, use it')
+ self.assertRegex(out.getvalue(), r'WARNING:.*deprecated.*input arg in testfunc. It\'s terrible, don\'t use it')
+ self.assertNotRegex(out.getvalue(), r'WARNING:.*introduced.*input arg in testfunc. It\'s awesome, use it')
def test_typed_kwarg_validator(self) -> None:
@typed_kwargs(
@@ -1408,7 +1408,7 @@ class InternalTests(unittest.TestCase):
@typed_kwargs(
'testfunc',
KwargInfo('input', ContainerTypeInfo(list, str), listify=True, default=[], deprecated_values={'foo': '0.9'}, since_values={'bar': '1.1'}),
- KwargInfo('output', ContainerTypeInfo(dict, str), default={}, deprecated_values={'foo': '0.9', 'foo2': ('0.9', 'dont use it')}, since_values={'bar': '1.1', 'bar2': ('1.1', 'use this')}),
+ KwargInfo('output', ContainerTypeInfo(dict, str), default={}, deprecated_values={'foo': '0.9', 'foo2': ('0.9', 'don\'t use it')}, since_values={'bar': '1.1', 'bar2': ('1.1', 'use this')}),
KwargInfo('install_dir', (bool, str, NoneType), deprecated_values={False: '0.9'}),
KwargInfo(
'mode',
@@ -1443,7 +1443,7 @@ class InternalTests(unittest.TestCase):
with self.subTest('deprecated dict string value with msg'), mock.patch('sys.stdout', io.StringIO()) as out:
_(None, mock.Mock(subproject=''), [], {'output': {'foo2': 'a'}})
- self.assertRegex(out.getvalue(), r"""WARNING:.Project targets '1.0'.*deprecated since '0.9': "testfunc" keyword argument "output" value "foo2" in dict keys. dont use it.*""")
+ self.assertRegex(out.getvalue(), r"""WARNING:.Project targets '1.0'.*deprecated since '0.9': "testfunc" keyword argument "output" value "foo2" in dict keys. don't use it.*""")
with self.subTest('new dict string value'), mock.patch('sys.stdout', io.StringIO()) as out:
_(None, mock.Mock(subproject=''), [], {'output': {'bar': 'b'}})
diff --git a/unittests/machinefiletests.py b/unittests/machinefiletests.py
index 8de0c602d..ba9cb1153 100644
--- a/unittests/machinefiletests.py
+++ b/unittests/machinefiletests.py
@@ -330,7 +330,7 @@ class NativeFileTests(BasePlatformTests):
elif comp.id == 'gcc':
if shutil.which('ifort'):
# There is an ICC for windows (windows build, linux host),
- # but we don't support that ATM so lets not worry about it.
+ # but we don't support that ATM so let's not worry about it.
if is_windows():
return 'ifort', 'intel-cl'
return 'ifort', 'intel'
@@ -634,7 +634,7 @@ class NativeFileTests(BasePlatformTests):
testcase = os.path.join(self.rust_test_dir, '12 bindgen')
config = self.helper_create_native_file({
- 'properties': {'bindgen_clang_arguments': 'sentinal'}
+ 'properties': {'bindgen_clang_arguments': 'sentinel'}
})
self.init(testcase, extra_args=['--native-file', config])
@@ -642,10 +642,10 @@ class NativeFileTests(BasePlatformTests):
for t in targets:
if t['id'].startswith('rustmod-bindgen'):
args: T.List[str] = t['target_sources'][0]['compiler']
- self.assertIn('sentinal', args, msg="Did not find machine file value")
+ self.assertIn('sentinel', args, msg="Did not find machine file value")
cargs_start = args.index('--')
- sent_arg = args.index('sentinal')
- self.assertLess(cargs_start, sent_arg, msg='sentinal argument does not come after "--"')
+ sent_arg = args.index('sentinel')
+ self.assertLess(cargs_start, sent_arg, msg='sentinel argument does not come after "--"')
break
else:
self.fail('Did not find a bindgen target')