def test_getProgramsMenuPath(self): """ L{getProgramsMenuPath} guesses the programs menu path on non-win32 platforms. On non-win32 it will try to figure out the path by examining the registry. """ if not platform.isWindows(): self.assertEqual(win32.getProgramsMenuPath(), "C:\\Windows\\Start Menu\\Programs") else: self.assertIsInstance(win32.getProgramsMenuPath(), str)
def test_deprecationGetProgramsMenuPath(self): """ L{getProgramsMenuPath} has been deprecated. """ win32.getProgramsMenuPath() emittedWarnings = self.flushWarnings( [self.test_deprecationGetProgramsMenuPath]) self.assertEqual(len(emittedWarnings), 1) self.assertIs(emittedWarnings[0]["category"], DeprecationWarning) self.assertEqual( emittedWarnings[0]["message"], "twisted.python.win32.getProgramsMenuPath was deprecated in " "Twisted 15.3.0")