From 737d7a8b36d871396087233217c1594a89c9d2b5 Mon Sep 17 00:00:00 2001 From: Guillaume MOUGEOT Date: Tue, 22 Nov 2022 16:27:50 +0100 Subject: [PATCH] c'est de la merdre --- test/player_ut.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/player_ut.py b/test/player_ut.py index e69de29..4b99a1d 100644 --- a/test/player_ut.py +++ b/test/player_ut.py @@ -0,0 +1,18 @@ +import unittest +from parametrized import parametrized +from src.player import Players + +class TestPlayer(unittest.TestCase): + @parametrized.expand([ + ("joe", "jonny", True), + (1, "jonny", False), + ("joe", 15, False), + ]) + def testString(self, name1, name2, no_exception): + try: + players = Players(name1=name1, name2=name2) + except: + self.assertFalse(no_exception) + +if __name__=='__main__': + test_player = TestPlayer() \ No newline at end of file