[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ComponentArchitecture/Browser/tests - testInterfaceWidget.py:1.3

Steve Alexander steve@cat-box.net
Sat, 21 Dec 2002 14:50:29 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ComponentArchitecture/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv8283/lib/python/Zope/App/ComponentArchitecture/Browser/tests

Modified Files:
	testInterfaceWidget.py 
Log Message:
removed bogus ability to run from the commandline -- you can't do that
with this test because it relies on exactly which place an interface is
imported from, so it won't work if they are imported from the main module.
Yet another reason to use test.py to run tests.

Also, gave the test a better name.


=== Zope3/lib/python/Zope/App/ComponentArchitecture/Browser/tests/testInterfaceWidget.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/ComponentArchitecture/Browser/tests/testInterfaceWidget.py:1.2	Thu Dec  5 08:27:04 2002
+++ Zope3/lib/python/Zope/App/ComponentArchitecture/Browser/tests/testInterfaceWidget.py	Sat Dec 21 14:50:29 2002
@@ -18,7 +18,6 @@
 
 __metaclass__ = type
 
-
 from Interface import Interface
 from unittest import TestCase, TestSuite, main, makeSuite
 from Zope.Testing.CleanUp import CleanUp
@@ -54,7 +53,7 @@
     """Test Interface for InterfaceService Instance.
     """
 
-    def testInterfaceField(self):
+    def testInterfaceWidget(self):
         service = InterfaceService()
         defineService('Interfaces', IInterfaceService)
         serviceManager.provideService('Interfaces', service)
@@ -181,19 +180,7 @@
         self.assertEqual(widget(), out)
 
        
-        
-
-def test_suite():
-    return TestSuite((makeSuite(Test),))
-
-if __name__=='__main__':
-    main(defaultTest='test_suite')
-    self.assertEqual(list(service.searchInterface('two')), [I3])
-                
-
 def test_suite():
     return TestSuite((makeSuite(Test),))
 
-if __name__=='__main__':
-    main(defaultTest='test_suite')