summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-06-05 12:44:56 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-06-05 14:29:25 -0700
commit7c84341e7ad2b9bb73eea85fe02ec155ef575128 (patch)
tree33ce99b6ac4eb9be7cb9fb2142a67d92fa662a8c /unittests
parentf4f64280c36f738b2bfde82d33c375cf9263dec0 (diff)
downloadmeson-7c84341e7ad2b9bb73eea85fe02ec155ef575128.tar.gz
unittests: use UnitTest helper methods instead of raw assert
Which doesn't give helpful error messages unless used with pytest
Diffstat (limited to 'unittests')
-rw-r--r--unittests/optiontests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/optiontests.py b/unittests/optiontests.py
index 5758a2d5c..ee84f9582 100644
--- a/unittests/optiontests.py
+++ b/unittests/optiontests.py
@@ -221,8 +221,8 @@ class OptionTests(unittest.TestCase):
def test_b_nonexistent(self):
optstore = OptionStore(False)
- assert optstore.accept_as_pending_option(OptionKey('b_ndebug'))
- assert not optstore.accept_as_pending_option(OptionKey('b_whatever'))
+ self.assertTrue(optstore.accept_as_pending_option(OptionKey('b_ndebug')))
+ self.assertFalse(optstore.accept_as_pending_option(OptionKey('b_whatever')))
def test_reconfigure_b_nonexistent(self):
optstore = OptionStore(False)
@@ -231,8 +231,8 @@ class OptionTests(unittest.TestCase):
def test_subproject_nonexistent(self):
optstore = OptionStore(False)
subprojects = {'found'}
- assert not optstore.accept_as_pending_option(OptionKey('foo', subproject='found'), subprojects)
- assert optstore.accept_as_pending_option(OptionKey('foo', subproject='whatisthis'), subprojects)
+ self.assertFalse(optstore.accept_as_pending_option(OptionKey('foo', subproject='found'), subprojects))
+ self.assertTrue(optstore.accept_as_pending_option(OptionKey('foo', subproject='whatisthis'), subprojects))
def test_deprecated_nonstring_value(self):
# TODO: add a lot more deprecated option tests