From 0ddd0c5ec5406c0750bc81f862910b688feef9cb Mon Sep 17 00:00:00 2001 From: Muhamed <Muhamedalici@hotmail.de> Date: Sat, 5 Apr 2025 22:00:00 +0200 Subject: [PATCH] Hatice --- "Test_Converter_R\303\266mische_Zahlen.py" | 71 ++---------------- .../__pycache__/converter.cpython-311.pyc | Bin 0 -> 4266 bytes report.md | 3 +- 3 files changed, 7 insertions(+), 67 deletions(-) create mode 100644 muhamed_directory/other/hatice/__pycache__/converter.cpython-311.pyc diff --git "a/Test_Converter_R\303\266mische_Zahlen.py" "b/Test_Converter_R\303\266mische_Zahlen.py" index 2fdf48b..e3aea49 100644 --- "a/Test_Converter_R\303\266mische_Zahlen.py" +++ "b/Test_Converter_R\303\266mische_Zahlen.py" @@ -3,7 +3,8 @@ import unittest from abc import ABC, abstractmethod #from muhamed_directory.other.alma.test2converter import RomanNumber as Alma -from muhamed_directory.other.daniel.converter import Converter as Dani +#from muhamed_directory.other.daniel.converter import Converter as Dani +from muhamed_directory.other.hatice.converter import RomanNumber as Hati class IStringCalculator(ABC): @abstractmethod @@ -26,10 +27,10 @@ class Converter(IStringCalculator): return result -'''class TestRomanConverter(unittest.TestCase): +class TestRomanConverter(unittest.TestCase): def setUp(self): - self.calculator = Dani + self.calculator = Hati def test_1(self): self.assertEqual(self.calculator.convert(1), "I") @@ -50,69 +51,7 @@ class Converter(IStringCalculator): self.assertEqual(self.calculator.convert(1000), "M") def test_1999(self): - self.assertEqual(self.calculator.convert(1999), "MCMXCIX")''' - -class TestConverter(unittest.TestCase): - def setUp(self): - self.c = Converter - - def test_convertOne(self): - res = self.c.convert(1) - self.assertEqual(res, 'I') - - def test_convertTwo(self): - res = self.c.convert(2) - self.assertEqual(res, 'II') - - def test_convertThree(self): - res = self.c.convert(3) - self.assertEqual(res, 'III') - - def test_convertFour(self): - res = self.c.convert(4) - self.assertEqual(res, 'IV') - - def test_convertFive(self): - res = self.c.convert(5) - self.assertEqual(res, 'V') - - def test_convertNine(self): - res = self.c.convert(9) - self.assertEqual(res, 'IX') - - def test_convertTen(self): - res = self.c.convert(10) - self.assertEqual(res, 'X') - - def test_convertTwentyTwo(self): - res = self.c.convert(21) - self.assertEqual(res, 'XXI') - - def test_convertFifty(self): - res = self.c.convert(50) - self.assertEqual(res, 'L') - - def test_convertHundred(self): - res = self.c.convert(100) - self.assertEqual(res, 'C') - - def test_convertFiveHundred(self): - res = self.c.convert(500) - self.assertEqual(res, 'D') - - def test_convertThousand(self): - res = self.c.convert(1000) - self.assertEqual(res, 'M') - - def test_convertFourDigit(self): - res = self.c.convert(1111) - self.assertEqual(res, 'MCXI') - - def test_convertNintyNine(self): - res = self.c.convert(99) - self.assertEqual(res, 'XCIX') - - + self.assertEqual(self.calculator.convert(1999), "MCMXCIX") if __name__ == "__main__": unittest.main() \ No newline at end of file diff --git a/muhamed_directory/other/hatice/__pycache__/converter.cpython-311.pyc b/muhamed_directory/other/hatice/__pycache__/converter.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4f84ad4ae027f6ae2c09c923699dc5e41872ad4a GIT binary patch literal 4266 zcmdT{%}*Og6rcUF7u#SyOv2J8HBH*!G$9fp4Uni!0#QrV5GgcKWLaG~o=I?m?R0iQ z3ZjxLap2HHZn#noK2Z@=iT|WFvJ`8jN|k!4Z$@y+rG0M<2G+!iR9`x4|7LdH+uy!< z@6GJYukGzV0>v`7pZw+_<S)G0FWO#X=QT7|2_;mTBT=m7IVmMa<&+XtBqEcq2vwE| zRhhh|5V8UPT8XMcrh&}ERF_N>GB3z<MxMgEYsIDIWjbwpCZmjZ$pkdp_7uq)G&c5c zhy>Qnh=0Ua!QSbJ>?k*HO*kF#N0!aw2|LB?*$hq8AAv@Fh(mC*3iMHllBmoSDlwJH zOna=t(A1-^ih8IzLn4|Jn7Wrq#naRCsYi@EQrhuwX3z6<LfE_a9tmpn$PNw>y*NYG zrRjA7=BXB&d(6GiZ{ZW+@Y_scJa*q=+=`{<XXB~Z-87rz$psdhWY#k~^E^gb;u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}T`ppQ1wnk?#LC4H=*k2TY}UDU@*`glPf zZ>IHrT&=K6E*h6h#^ufXMg3YyzgEz%9cS0R)=bkeDn(<YWQ=SknvU`PwA7+;rDR;$ zwCZ+&Y4B_EdFqEi{%<}{t^D+<uIbyrEvBzFT@m~2AxQd40^uJhd=y&TJ)wHVR7s|j zFqx7RcY|=Uu@(p4HL2X1IRC9hfaVkHR#CrN(ytcutId+`UeoEfpPC0+Fi+w4uAL<A z4*593mk6$t2=0?P0&W7Wn*iDRg-48Yc*NKPk6*i9C3Wamw6Q8_gxaPOIq|rZiYL>i z8Sy##d^%~Pn;j+oD8X@qC5}q9!w|mS(b3%#aaaL`S-2&3R3va&{Z_wTJ9~Y>Z-Wj@ z17iISP*o&Js_I1Q%m(o)lQV_mepOYG+QIY&czJmndv^~+K3$4bNh7?xu#LUD2cl3& x0(Ue*uCHXA-$udifpmnZftAHA#V9C7S?$Vxy?p1VyUTa8;;Je{?FWHy<i9N0FnRz0 literal 0 HcmV?d00001 diff --git a/report.md b/report.md index 5d4ce9e..ce266fa 100644 --- a/report.md +++ b/report.md @@ -3,4 +3,5 @@ | Alma | yes | all | `TypeError`: Methode `convert()` fehlt der erwartete Parameter `n`. Interface nicht eingehalten. | | ich vs Alma Tests | no | none | Einziger definierter Test in `test2converter.py` wurde bestanden. | | Daniel | yes | all | Die Tests rufen Converter.convert() als statische Methode auf, aber die convert-Methode aus Skript 1 ist eine Instanzmethode, die eine Objektinstanz (self) benötigt. Dieser falsche Aufruf verursacht bei jedem der 7 Tests einen TypeError, weil das erwartete self-Argument fehlt. | -| Ich vs Daniel Tests | no | none | \ No newline at end of file +| Ich vs Daniel Tests | no | none | +| Hatice | yes | all | TypeError: RomanNumber.convert() missing 1 required positional argument: 'n' | \ No newline at end of file -- GitLab