From 18da1f2043b727eb0e72d05e3e33a2a06fa0056a Mon Sep 17 00:00:00 2001 From: Guillaume MOUGEOT Date: Tue, 22 Nov 2022 16:52:24 +0100 Subject: [PATCH] test --- __init__.py | 1 + test/player_ut.py => player_ut.py | 8 +++++--- src/__init__.py | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) rename test/player_ut.py => player_ut.py (71%) diff --git a/__init__.py b/__init__.py index e69de29..4cf83ae 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1 @@ +__all__ = ['src/player'] \ No newline at end of file diff --git a/test/player_ut.py b/player_ut.py similarity index 71% rename from test/player_ut.py rename to player_ut.py index 4b99a1d..951549b 100644 --- a/test/player_ut.py +++ b/player_ut.py @@ -1,9 +1,10 @@ import unittest -from parametrized import parametrized +from parameterized import parameterized from src.player import Players +# from player import Players class TestPlayer(unittest.TestCase): - @parametrized.expand([ + @parameterized.expand([ ("joe", "jonny", True), (1, "jonny", False), ("joe", 15, False), @@ -11,8 +12,9 @@ class TestPlayer(unittest.TestCase): def testString(self, name1, name2, no_exception): try: players = Players(name1=name1, name2=name2) + self.assertTrue(no_exception) except: self.assertFalse(no_exception) if __name__=='__main__': - test_player = TestPlayer() \ No newline at end of file + unittest.main() \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py index e69de29..c54c549 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -0,0 +1 @@ +__all__ = ['player'] \ No newline at end of file