przetwarzanie_jezyka_natura.../B/test_B01.py
2022-11-05 19:53:13 +01:00

29 lines
787 B
Python

import unittest
import B01
class TestNames(unittest.TestCase):
def test_correct(self):
self.assertEqual(B01.is_name_correct("Nowy York"), True) # add assertion here
def test_wrong(self):
self.assertEqual(B01.is_name_correct("0123"), False)
class TestPhoneNumbers(unittest.TestCase):
def test_correct(self):
self.assertEqual(B01.is_phone_correct("(61) 222-45-56"), True)
def test_wrong(self):
self.assertEqual(B01.is_phone_correct("124466780"), False)
class TestZipCode(unittest.TestCase):
def test_correct(self):
self.assertEqual(B01.is_zipcode_correct("11-111"), True)
def test_wrong(self):
self.assertEqual(B01.is_zipcode_correct("(61) 222-45-56"), False)
if __name__ == '__main__':
unittest.main()