aboutsummaryrefslogtreecommitdiff
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 12:44:56 -0700
commit35995990cd8a1cb7311d238d619c265b5df39304 (patch)
treea28f08ec3b95d9023597e5151f6a4ce64cd12f4a
parentcbb259990f9509593a2f5765d0d625bcc1157463 (diff)
downloadmeson-submit/option-tests-unittest-helpers.zip
meson-submit/option-tests-unittest-helpers.tar.gz
meson-submit/option-tests-unittest-helpers.tar.bz2
unittests: use UnitTest helper methods instead of raw assertsubmit/option-tests-unittest-helpers
Which doesn't give helpful error messages unless used with pytest
-rw-r--r--unittests/optiontests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/optiontests.py b/unittests/optiontests.py
index 5758a2d..ee84f95 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