Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: third_party/twisted_8_1/twisted/test/app_qtstub.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/twisted_8_1/twisted/test/app_qtstub.py
diff --git a/third_party/twisted_8_1/twisted/test/app_qtstub.py b/third_party/twisted_8_1/twisted/test/app_qtstub.py
deleted file mode 100644
index aa0c527e4699858b9a0bfc70fdcc52875f3e73e1..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/test/app_qtstub.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (c) 2006 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-"""
-L{twisted.test.test_application.PluggableReactorTestCase.test_qtStub} uses
-this helper program to test that when the QT reactor plugin is not
-available, an attempt to select it via the deprecated name C{qt} fails
-appropriately.
-
-When installation fails, no output is produced. When it succeeds, a message
-is printed.
-"""
-
-import sys
-
-from twisted.application import reactors
-
-
-class QTNotImporter:
- """
- Import hook which unilaterally rejects any attempt to import
- C{qtreactor} so that we can reliably test the behavior of attempting to
- install it when it is not present.
- """
- def find_module(self, fullname, path):
- """
- Reject attempts to import C{qtreactor}. Ignore everything else.
- """
- if fullname == 'qtreactor':
- raise ImportError('qtreactor does not exist!')
-
-
-
-def main():
- """
- Try to install the reactor named C{qt}. Expect it to not work. Print
- diagnostics to stdout if something goes wrong, print nothing otherwise.
- """
- sys.meta_path.insert(0, QTNotImporter())
- try:
- reactors.installReactor('qt')
- except reactors.NoSuchReactor, e:
- if e.args != ('qt',):
- print 'Wrong arguments to NoSuchReactor:', e.args
- else:
- # Do nothing to indicate success.
- pass
- else:
- print 'installed qtreactor succesfully'
- sys.stdout.flush()
-
-if __name__ == '__main__':
- main()
« no previous file with comments | « third_party/twisted_8_1/twisted/test/__init__.py ('k') | third_party/twisted_8_1/twisted/test/crash_test_dummy.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698