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

Unified Diff: third_party/twisted_8_1/twisted/trial/test/test_test_visitor.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/trial/test/test_test_visitor.py
diff --git a/third_party/twisted_8_1/twisted/trial/test/test_test_visitor.py b/third_party/twisted_8_1/twisted/trial/test/test_test_visitor.py
deleted file mode 100644
index b5c3484e49b4752a0a4f78d6a771f1eec720ff75..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/trial/test/test_test_visitor.py
+++ /dev/null
@@ -1,82 +0,0 @@
-from twisted.trial import unittest
-from twisted.trial.runner import TestSuite, suiteVisit
-
-pyunit = __import__('unittest')
-
-
-
-class MockVisitor(object):
- def __init__(self):
- self.calls = []
-
-
- def __call__(self, testCase):
- self.calls.append(testCase)
-
-
-
-class TestTestVisitor(unittest.TestCase):
- def setUp(self):
- self.visitor = MockVisitor()
-
-
- def test_visitCase(self):
- """
- Test that C{visit} works for a single test case.
- """
- testCase = TestTestVisitor('test_visitCase')
- testCase.visit(self.visitor)
- self.assertEqual(self.visitor.calls, [testCase])
-
-
- def test_visitSuite(self):
- """
- Test that C{visit} hits all tests in a suite.
- """
- tests = [TestTestVisitor('test_visitCase'),
- TestTestVisitor('test_visitSuite')]
- testSuite = TestSuite(tests)
- testSuite.visit(self.visitor)
- self.assertEqual(self.visitor.calls, tests)
-
-
- def test_visitEmptySuite(self):
- """
- Test that C{visit} on an empty suite hits nothing.
- """
- TestSuite().visit(self.visitor)
- self.assertEqual(self.visitor.calls, [])
-
-
- def test_visitNestedSuite(self):
- """
- Test that C{visit} recurses through suites.
- """
- tests = [TestTestVisitor('test_visitCase'),
- TestTestVisitor('test_visitSuite')]
- testSuite = TestSuite([TestSuite([test]) for test in tests])
- testSuite.visit(self.visitor)
- self.assertEqual(self.visitor.calls, tests)
-
-
- def test_visitPyunitSuite(self):
- """
- Test that C{suiteVisit} visits stdlib unittest suites
- """
- test = TestTestVisitor('test_visitPyunitSuite')
- suite = pyunit.TestSuite([test])
- suiteVisit(suite, self.visitor)
- self.assertEqual(self.visitor.calls, [test])
-
-
- def test_visitPyunitCase(self):
- """
- Test that a stdlib test case in a suite gets visited.
- """
- class PyunitCase(pyunit.TestCase):
- def test_foo(self):
- pass
- test = PyunitCase('test_foo')
- TestSuite([test]).visit(self.visitor)
- self.assertEqual(
- [call.id() for call in self.visitor.calls], [test.id()])
« no previous file with comments | « third_party/twisted_8_1/twisted/trial/test/test_script.py ('k') | third_party/twisted_8_1/twisted/trial/test/test_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698