def test_singleton(self) -> None: """Test singleton.""" assert id(OsInfo()) == id(OsInfo())
def test_name_linux(self, platform_linux: None) -> None: """Test name linux.""" assert OsInfo().name == "linux"
def test_name_windows(self, platform_windows: None) -> None: """Test name windows.""" assert OsInfo().name == "windows"
def test_is_windows(self, platform_windows: None) -> None: """Test is_windows.""" assert OsInfo().is_windows
def test_name_darwin(self, platform_darwin: None) -> None: """Test name darwin.""" assert OsInfo().name == "darwin"
def test_is_posix(self, mocker: MockerFixture) -> None: """Test is_posix.""" mock_os = mocker.patch(f"{MODULE}.os") mock_os.name = "posix" assert OsInfo().is_posix
def test_is_windows_false(self, platform_linux: None) -> None: """Test is_windows False.""" assert not OsInfo().is_windows
def test_is_posix_false(self, mocker: MockerFixture) -> None: """Test is_posix False.""" mock_os = mocker.patch(f"{MODULE}.os") mock_os.name = "nt" assert not OsInfo().is_posix
def test_is_macos(self, platform_darwin: None) -> None: """Test is_macos.""" assert OsInfo().is_macos
def test_is_linux(self, platform_linux: None) -> None: """Test is_linux.""" assert OsInfo().is_linux
def test_is_linux_false(self, platform_darwin: None) -> None: """Test is_linux False.""" assert not OsInfo().is_linux
def clear_OsInfo() -> None: # noqa """Clear OsInfo singleton.""" OsInfo.clear_singleton()