[py-svn] r11008 - py/dist/py/test/tkinter/testing

hpk at codespeak.net hpk at codespeak.net
Thu Apr 21 23:54:22 CEST 2005


Author: hpk
Date: Thu Apr 21 23:54:22 2005
New Revision: 11008

Modified:
   py/dist/py/test/tkinter/testing/test_tixgui.py
Log:
slightly better style for skipping tests 
(in case some real more Tix tests are added)



Modified: py/dist/py/test/tkinter/testing/test_tixgui.py
==============================================================================
--- py/dist/py/test/tkinter/testing/test_tixgui.py	(original)
+++ py/dist/py/test/tkinter/testing/test_tixgui.py	Thu Apr 21 23:54:22 2005
@@ -1,11 +1,15 @@
 
 import py
 
-def test_import_tix():
+def setup_module(mod): 
     try: 
         import Tix
     except ImportError: 
         py.test.skip("cannot import Tix") 
+    else: 
+        mod.Tix = Tix
+
+def test_import_tix():
     root = Tix.Tk()
     root.tk.eval('package require Tix')
 



More information about the pytest-commit mailing list