From 22627364cf5ed1981f2f1efe6b3012f11213021172cc0a8370b29e261e99d59e Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 30 Nov 2024 18:39:30 +0300 Subject: [PATCH] Remove __main__ entrypoints from tests Tests can easily be run directly by: python -m unittest python-path, so those __main__ are not helpful at all. --- pyac/tests/test_blob.py | 4 ---- pyac/tests/test_bool.py | 4 ---- pyac/tests/test_errors.py | 4 ---- pyac/tests/test_float.py | 4 ---- pyac/tests/test_list.py | 4 ---- pyac/tests/test_tai.py | 4 ---- pyac/tests/test_uuid.py | 4 ---- 7 files changed, 28 deletions(-) diff --git a/pyac/tests/test_blob.py b/pyac/tests/test_blob.py index 152d3d7..2950424 100644 --- a/pyac/tests/test_blob.py +++ b/pyac/tests/test_blob.py @@ -49,7 +49,3 @@ class TestBlob(TestCase): with self.assertRaises(DecodeError) as cm: loads(encoded) self.assertEqual(str(cm.exception), "unexpected tag") - - -if __name__ == "__main__": - unittest.main() diff --git a/pyac/tests/test_bool.py b/pyac/tests/test_bool.py index 4e0766e..c711a00 100644 --- a/pyac/tests/test_bool.py +++ b/pyac/tests/test_bool.py @@ -31,7 +31,3 @@ class TestBool(TestCase): decoded, remaining = loads(encoded) self.assertIs(decoded, False) self.assertEqual(remaining, junk) - - -if __name__ == "__main__": - unittest.main() diff --git a/pyac/tests/test_errors.py b/pyac/tests/test_errors.py index 7fa8801..fd44c58 100644 --- a/pyac/tests/test_errors.py +++ b/pyac/tests/test_errors.py @@ -41,7 +41,3 @@ class TestError(TestCase): with self.assertRaises(NotEnoughData): encoded: bytes = b"" loads(encoded) - - -if __name__ == "__main__": - unittest.main() diff --git a/pyac/tests/test_float.py b/pyac/tests/test_float.py index 1dfc269..c86b241 100644 --- a/pyac/tests/test_float.py +++ b/pyac/tests/test_float.py @@ -45,7 +45,3 @@ class TestFloat(TestCase): for fl in floats: with self.assertRaises(NotEnoughData): loads(fl) - - -if __name__ == "__main__": - unittest.main() diff --git a/pyac/tests/test_list.py b/pyac/tests/test_list.py index 55453e2..9deebf2 100644 --- a/pyac/tests/test_list.py +++ b/pyac/tests/test_list.py @@ -74,7 +74,3 @@ class TestList(TestCase): with self.assertRaises(NotEnoughData) as cm: loads(encoded) self.assertEqual(cm.exception.n, 1) - - -if __name__ == "__main__": - unittest.main() diff --git a/pyac/tests/test_tai.py b/pyac/tests/test_tai.py index 6af631d..75b680a 100644 --- a/pyac/tests/test_tai.py +++ b/pyac/tests/test_tai.py @@ -143,7 +143,3 @@ class TestTAI64(TestCase): self.assertIsInstance(decoded, datetime) decoded, remaining = loads(v=b"\x18" + bytes.fromhex(leapsec), leapsecUTCAllow=False) self.assertIsInstance(decoded, Raw) - - -if __name__ == "__main__": - unittest.main() diff --git a/pyac/tests/test_uuid.py b/pyac/tests/test_uuid.py index 4fe2eb6..1c33220 100644 --- a/pyac/tests/test_uuid.py +++ b/pyac/tests/test_uuid.py @@ -25,7 +25,3 @@ class TestUUID(TestCase): encoded: bytes = b"\x04\x124Vx\x124Vx\x124Vx\x124V" with self.assertRaises(NotEnoughData): loads(encoded) - - -if __name__ == "__main__": - unittest.main() -- 2.50.0