mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
Core: Support inequality operators ("less than") for Choice option string comparisons (#3769)
* add some unit tests to it * fix * Update Options.py Co-authored-by: qwint <qwint.42@gmail.com> * Update Options.py --------- Co-authored-by: qwint <qwint.42@gmail.com>
This commit is contained in:
@@ -33,6 +33,15 @@ class TestNumericOptions(unittest.TestCase):
|
||||
self.assertEqual(choice_option_alias, TestChoice.alias_three)
|
||||
self.assertEqual(choice_option_attr, TestChoice.non_option_attr)
|
||||
|
||||
self.assertLess(choice_option_string, "two")
|
||||
self.assertGreater(choice_option_string, "zero")
|
||||
self.assertLessEqual(choice_option_string, "one")
|
||||
self.assertLessEqual(choice_option_string, "two")
|
||||
self.assertGreaterEqual(choice_option_string, "one")
|
||||
self.assertGreaterEqual(choice_option_string, "zero")
|
||||
|
||||
self.assertGreaterEqual(choice_option_alias, "three")
|
||||
|
||||
self.assertRaises(KeyError, TestChoice.from_any, "four")
|
||||
|
||||
self.assertIn(choice_option_int, [1, 2, 3])
|
||||
|
Reference in New Issue
Block a user