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

Unified Diff: third_party/twisted_8_1/twisted/test/test_roots.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/test_roots.py
diff --git a/third_party/twisted_8_1/twisted/test/test_roots.py b/third_party/twisted_8_1/twisted/test/test_roots.py
deleted file mode 100644
index 023b8fe176dad931fd293d36c8fd398809cdbc9c..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/test/test_roots.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-from twisted.trial import unittest
-from twisted.python import roots
-import types
-
-class RootsTest(unittest.TestCase):
-
- def testExceptions(self):
- request = roots.Request()
- try:
- request.write("blah")
- except NotImplementedError:
- pass
- else:
- self.fail()
- try:
- request.finish()
- except NotImplementedError:
- pass
- else:
- self.fail()
-
- def testCollection(self):
- collection = roots.Collection()
- collection.putEntity("x", 'test')
- self.failUnlessEqual(collection.getStaticEntity("x"),
- 'test')
- collection.delEntity("x")
- self.failUnlessEqual(collection.getStaticEntity('x'),
- None)
- try:
- collection.storeEntity("x", None)
- except NotImplementedError:
- pass
- else:
- self.fail()
- try:
- collection.removeEntity("x", None)
- except NotImplementedError:
- pass
- else:
- self.fail()
-
- def testConstrained(self):
- class const(roots.Constrained):
- def nameConstraint(self, name):
- return (name == 'x')
- c = const()
- self.failUnlessEqual(c.putEntity('x', 'test'), None)
- self.failUnlessRaises(roots.ConstraintViolation,
- c.putEntity, 'y', 'test')
-
-
- def testHomogenous(self):
- h = roots.Homogenous()
- h.entityType = types.IntType
- h.putEntity('a', 1)
- self.failUnlessEqual(h.getStaticEntity('a'),1 )
- self.failUnlessRaises(roots.ConstraintViolation,
- h.putEntity, 'x', 'y')
-
« no previous file with comments | « third_party/twisted_8_1/twisted/test/test_reflector.py ('k') | third_party/twisted_8_1/twisted/test/test_shortcut.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698