def METHOD_NAME(self):
    # makes sure query_vcvarsall raises
    # a DistutilsPlatformError if the compiler
    # is not found
    from distutils.msvc9compiler import query_vcvarsall
    def _find_vcvarsall(version):
        return None
    from distutils import msvc9compiler
    old_find_vcvarsall = msvc9compiler.find_vcvarsall
    msvc9compiler.find_vcvarsall = _find_vcvarsall
    try:
        self.assertRaises(DistutilsPlatformError, query_vcvarsall,
                         'wont find this version')
    finally:
        msvc9compiler.find_vcvarsall = old_find_vcvarsall