From 893b136e20ca5c2cf9388109e1ad493a02fdfe53 Mon Sep 17 00:00:00 2001 From: Phil <2121464@stud.hs-mannheim.de> Date: Mon, 9 Jan 2023 14:53:41 +0100 Subject: [PATCH] Arbeite mal moritz lutz --- __pycache__/s2_a4_a.cpython-311.pyc | Bin 0 -> 983 bytes s2_a4_b.py | 33 +++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 __pycache__/s2_a4_a.cpython-311.pyc diff --git a/__pycache__/s2_a4_a.cpython-311.pyc b/__pycache__/s2_a4_a.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c2f15a61fca2a309fd715879d3dce5270725c13 GIT binary patch literal 983 zcma)3OK1~87@pni=G8VyD@fHtw^h(ZHkhQgjRae&qIf8cYn7%eVVfP(ZTIEu=8)LJ zDm{tdu~h_n@_`o>!5(_>1$xXv4q>5QJmnVXttV$wTTP4L|1%%|>zi*LFS@$I0Nam4 z8wHgB;HQ`Dn(ue8HHL!~AOVR`Kn_UcGRP4mfQ00GjybRK+OZsot3F7!R|(AH0ZTQ! zp^3uYG|nizJe935uC4&NodzUuO{_|IG zSE4-pCxdQR_z#BvAcF^1=+8lNgff(=eo28Gk3iP1RrQ!_~}eM^w;CYRV&j>D7} z?lfl3a3ee26KsV{a1HO_wh6A`JyFBEcc~Y{lvez*p;&SeGS{I3Z|j;?QdNjp+9eTm z0|i|*WCgmkDq4j(mo6f`WVqoQqEdpF5YiFrbN!ey3y~WzM9YFmbA6U-n4Sc~Fxz6` zoG@iVWD3TdtjNMeXf9Z~Aza}F9;!@An7o!^cniuJ-lGVSFj=> z-dsSkVVMTXTToOJ$-J2q%w%31%!_fO?1nTQsiGoRAnL}dp0ZiSV1vy_?BRU%$fOg= z)*@N^a?=kwdLD5PxK+Os?yH6S>}4saaIQ&uJi8vt9wz<27O!wu2c}mr4pej}GJ1`!sV5 xL(@kPL>+|emN%&YG28@u&;x?qcDdT!?*s;FfdQMU1KOr->0ZZjhu!j)!Y^;D-+KT6 literal 0 HcmV?d00001 diff --git a/s2_a4_b.py b/s2_a4_b.py index 9d4f95d..8168465 100644 --- a/s2_a4_b.py +++ b/s2_a4_b.py @@ -1,2 +1,33 @@ import unittest -import s2_a4_a \ No newline at end of file +import s2_a4_a + +test_numbers = [ + "+1 223-456-7890", + "1-223-456-7890", + "+1 223 456-7890", + "(223) 456-7890", + "1 223 456 7890", + "223.456.7890", + "1-989-111-2222", + ] + +test_results = [ + "1-223-456-7890" + +] + +class Test_Normalizer(unittest.TestCase): + + + def test1(self): + input = s2_a4_a.normalize(test_numbers[0]) + output = test_results[0] + self.assertEqual(input, output) + + + def test2(self): + self.assertRaises(ValueError, s2_a4_a.normalize, "Gehen Strings fit bre?") + + +if __name__ == '__main__': + unittest.main()