You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.0 KiB
37 lines
1.0 KiB
5 months ago
|
import unittest
|
||
|
import Kreis
|
||
|
import Kreis_getattr
|
||
|
|
||
|
|
||
|
class TestKreis(unittest.TestCase):
|
||
|
|
||
|
def setUp(self):
|
||
|
self.kreis = Kreis.Kreis(1)
|
||
|
self.kreis_getattr = Kreis_getattr.Kreis_getattr(1)
|
||
|
|
||
|
|
||
|
def test_Umfang(self):
|
||
|
umfang = self.kreis.umfang()
|
||
|
umfang_getattr = self.kreis_getattr.umfang
|
||
|
print(f'kreis Umfang {umfang}')
|
||
|
print(f'kreis_gettattr Umfang {umfang_getattr}')
|
||
|
self.assertEqual(umfang, umfang_getattr)
|
||
|
|
||
|
def test_Flaeche(self):
|
||
|
flaeche = self.kreis.flaeche()
|
||
|
flaeche_getattr = self.kreis_getattr.flaeche
|
||
|
print(f'kreis Fläche {flaeche}')
|
||
|
print(f'kreis_gettattr Fläche {flaeche_getattr}')
|
||
|
self.assertEqual(flaeche, flaeche_getattr)
|
||
|
|
||
|
def test_Durchmesser(self):
|
||
|
durchmesser = self.kreis.durchmesser()
|
||
|
durchmesser_getattr = self.kreis_getattr.durchmesser
|
||
|
print(f'kreis Durchmesser {durchmesser}')
|
||
|
print(f'kreis_gettattr Durchmesser {durchmesser_getattr}')
|
||
|
self.assertEqual(durchmesser, durchmesser_getattr)
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
unittest.main()
|