コード例 #1
0
ファイル: test_win32.py プロジェクト: Architektor/PySnip
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: test_win32.py プロジェクト: Architektor/PySnip
    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")
コード例 #4
0
    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")