Improved type hints.

This commit is contained in:
Patrick Lehmann
2025-12-30 11:13:23 +01:00
parent 878031f339
commit 0cf94920f2
2 changed files with 10 additions and 10 deletions

View File

@@ -44,55 +44,55 @@ if __name__ == "__main__": # pragma: no cover
class PlatformTesting(TestCase): class PlatformTesting(TestCase):
@mark.skipif(not CurrentPlatform.IsNativeLinux, reason="Skipped, if current platform isn't native Linux.") @mark.skipif(not CurrentPlatform.IsNativeLinux, reason="Skipped, if current platform isn't native Linux.")
def test_ApplicationOnNativeLinux(self): def test_ApplicationOnNativeLinux(self) -> None:
app = Application() app = Application()
self.assertEqual(1, app.Value) self.assertEqual(1, app.Value)
@mark.skipif(not CurrentPlatform.IsNativeMacOS, reason="Skipped, if current platform isn't native macOS.") @mark.skipif(not CurrentPlatform.IsNativeMacOS, reason="Skipped, if current platform isn't native macOS.")
def test_ApplicationOnNativeMacOS(self): def test_ApplicationOnNativeMacOS(self) -> None:
app = Application() app = Application()
self.assertEqual(2, app.Value) self.assertEqual(2, app.Value)
@mark.skipif(not CurrentPlatform.IsNativeWindows, reason="Skipped, if current platform isn't native Windows.") @mark.skipif(not CurrentPlatform.IsNativeWindows, reason="Skipped, if current platform isn't native Windows.")
def test_ApplicationOnNativeWindows(self): def test_ApplicationOnNativeWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(3, app.Value) self.assertEqual(3, app.Value)
@mark.skipif(not CurrentPlatform.IsMSYSOnWindows, reason="Skipped, if current platform isn't MSYS on Windows.") @mark.skipif(not CurrentPlatform.IsMSYSOnWindows, reason="Skipped, if current platform isn't MSYS on Windows.")
def test_ApplicationOnMSYS2OnWindows(self): def test_ApplicationOnMSYS2OnWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(11, app.Value) self.assertEqual(11, app.Value)
@mark.skipif(not CurrentPlatform.IsMinGW32OnWindows, reason="Skipped, if current platform isn't MinGW32 on Windows.") @mark.skipif(not CurrentPlatform.IsMinGW32OnWindows, reason="Skipped, if current platform isn't MinGW32 on Windows.")
def test_ApplicationOnMinGW32OnWindows(self): def test_ApplicationOnMinGW32OnWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(12, app.Value) self.assertEqual(12, app.Value)
@mark.skipif(not CurrentPlatform.IsMinGW64OnWindows, reason="Skipped, if current platform isn't MinGW64 on Windows.") @mark.skipif(not CurrentPlatform.IsMinGW64OnWindows, reason="Skipped, if current platform isn't MinGW64 on Windows.")
def test_ApplicationOnMinGW64OnWindows(self): def test_ApplicationOnMinGW64OnWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(13, app.Value) self.assertEqual(13, app.Value)
@mark.skipif(not CurrentPlatform.IsUCRT64OnWindows, reason="Skipped, if current platform isn't UCRT64 on Windows.") @mark.skipif(not CurrentPlatform.IsUCRT64OnWindows, reason="Skipped, if current platform isn't UCRT64 on Windows.")
def test_ApplicationOnURTC64OnWindows(self): def test_ApplicationOnURTC64OnWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(14, app.Value) self.assertEqual(14, app.Value)
@mark.skipif(not CurrentPlatform.IsClang32OnWindows, reason="Skipped, if current platform isn't Clang32 on Windows.") @mark.skipif(not CurrentPlatform.IsClang32OnWindows, reason="Skipped, if current platform isn't Clang32 on Windows.")
def test_ApplicationOnClang32OnWindows(self): def test_ApplicationOnClang32OnWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(15, app.Value) self.assertEqual(15, app.Value)
@mark.skipif(not CurrentPlatform.IsClang64OnWindows, reason="Skipped, if current platform isn't Clang64 on Windows.") @mark.skipif(not CurrentPlatform.IsClang64OnWindows, reason="Skipped, if current platform isn't Clang64 on Windows.")
def test_ApplicationOnClang64OnWindows(self): def test_ApplicationOnClang64OnWindows(self) -> None:
app = Application() app = Application()
self.assertEqual(16, app.Value) self.assertEqual(16, app.Value)

View File

@@ -34,7 +34,7 @@ from myPackage import Application
class Instantiation(TestCase): class Instantiation(TestCase):
def test_Application(self): def test_Application(self) -> None:
app = Application() app = Application()
self.assertGreater(app.Value, 0) self.assertGreater(app.Value, 0)