20251005
This commit is contained in:
@@ -1,21 +1,19 @@
|
||||
# string_extension_test.py
|
||||
# bool_extension_test.py
|
||||
|
||||
import unittest
|
||||
|
||||
from anb_python_components.extensions.bool_extension import *
|
||||
|
||||
|
||||
class BoolExtensionTest(unittest.TestCase):
|
||||
def test_to_str(self):
|
||||
def test_to_str (self):
|
||||
self.assertEqual(BoolExtension.to_str(True, "да", "нет"), "да")
|
||||
self.assertEqual(BoolExtension.to_str(False, "да", "нет"), "нет")
|
||||
|
||||
def test_true_count(self):
|
||||
|
||||
def test_true_count (self):
|
||||
self.assertEqual(BoolExtension.true_count([False, True, False, True, True, False, False]), 3)
|
||||
|
||||
def test_any_true(self):
|
||||
|
||||
def test_any_true (self):
|
||||
self.assertTrue(BoolExtension.any_true([False, True, False, True, True, False, False]))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
unittest.main()
|
Reference in New Issue
Block a user