[Zope3-checkins] CVS: Zope3/src/zope/schema/tests - test_vocabulary.py:1.8

Fred L. Drake, Jr. fred@zope.com
Wed, 4 Jun 2003 11:10:38 -0400


Update of /cvs-repository/Zope3/src/zope/schema/tests
In directory cvs.zope.org:/tmp/cvs-serv21885

Modified Files:
	test_vocabulary.py 
Log Message:
Conserve work: only create the vocabularies used to test
SimpleVocabulary once, not for each test, since these are immutable.


=== Zope3/src/zope/schema/tests/test_vocabulary.py 1.7 => 1.8 ===
--- Zope3/src/zope/schema/tests/test_vocabulary.py:1.7	Wed Jun  4 05:09:46 2003
+++ Zope3/src/zope/schema/tests/test_vocabulary.py	Wed Jun  4 11:10:37 2003
@@ -130,10 +130,9 @@
 
 class SimpleVocabularyTests(unittest.TestCase):
 
-    def setUp(self):
-        self.list_vocab = vocabulary.SimpleVocabulary([1, 2, 3])
-        self.items_vocab = vocabulary.SimpleVocabulary.fromItems(
-            [('one', 1), ('two', 2), ('three', 3), ('fore!', 4)])
+    list_vocab = vocabulary.SimpleVocabulary([1, 2, 3])
+    items_vocab = vocabulary.SimpleVocabulary.fromItems(
+        [('one', 1), ('two', 2), ('three', 3), ('fore!', 4)])
 
     def test_simple_term(self):
         t = vocabulary.SimpleTerm(1)