[py-svn] r37025 - in py/branch/config/py/test: . testing

hpk at codespeak.net hpk at codespeak.net
Fri Jan 19 17:59:52 CET 2007


Author: hpk
Date: Fri Jan 19 17:59:50 2007
New Revision: 37025

Modified:
   py/branch/config/py/test/config.py
   py/branch/config/py/test/conftesthandle.py
   py/branch/config/py/test/testing/test_conftesthandle.py
Log:
remove lget and its last usage (which was a bit random)


Modified: py/branch/config/py/test/config.py
==============================================================================
--- py/branch/config/py/test/config.py	(original)
+++ py/branch/config/py/test/config.py	Fri Jan 19 17:59:50 2007
@@ -43,7 +43,7 @@
                 "can only parse cmdline args once per Config object")
         self._parsed = True
         self.conftest.setinitial(args) 
-        self.conftest.lget('adddefaultoptions')()
+        self.conftest.rget('adddefaultoptions')()
         args = [str(x) for x in args]
         self._origargs = args
         cmdlineoption, remaining = self._parser.parse_args(args) 

Modified: py/branch/config/py/test/conftesthandle.py
==============================================================================
--- py/branch/config/py/test/conftesthandle.py	(original)
+++ py/branch/config/py/test/conftesthandle.py	Fri Jan 19 17:59:50 2007
@@ -51,9 +51,10 @@
         # affect us by always returning a copy of the actual list 
         return clist[:]
 
-    def lget(self, name, path=None):
-        modules = self.getconftestmodules(path)
-        return self._get(name, modules)
+    # XXX no real use case, may probably go 
+    #def lget(self, name, path=None):
+    #    modules = self.getconftestmodules(path)
+    #    return self._get(name, modules)
    
     def rget(self, name, path=None):
         modules = self.getconftestmodules(path)

Modified: py/branch/config/py/test/testing/test_conftesthandle.py
==============================================================================
--- py/branch/config/py/test/testing/test_conftesthandle.py	(original)
+++ py/branch/config/py/test/testing/test_conftesthandle.py	Fri Jan 19 17:59:50 2007
@@ -25,40 +25,40 @@
     def test_default_Module_setting_is_visible_always(self):
         for path in self.basedir.parts():
             conftest = Conftest(path) 
-            assert conftest.lget("Module") == py.test.collect.Module
+            #assert conftest.lget("Module") == py.test.collect.Module
             assert conftest.rget("Module") == py.test.collect.Module
 
     def test_default_has_lower_prio(self):
         conftest = Conftest(self.basedir.join("adir"))
         assert conftest.rget('Directory') == 3
-        assert conftest.lget('Directory') == py.test.collect.Directory 
+        #assert conftest.lget('Directory') == py.test.collect.Directory 
         
     def test_value_access_not_existing(self):
         conftest = Conftest(self.basedir)
         py.test.raises(KeyError, "conftest.rget('a')")
-        py.test.raises(KeyError, "conftest.lget('a')")
+        #py.test.raises(KeyError, "conftest.lget('a')")
 
     def test_value_access_by_path(self):
         conftest = Conftest(self.basedir)
         assert conftest.rget("a", self.basedir.join('adir')) == 1
-        assert conftest.lget("a", self.basedir.join('adir')) == 1
+        #assert conftest.lget("a", self.basedir.join('adir')) == 1
         assert conftest.rget("a", self.basedir.join('adir', 'b')) == 1.5 
-        assert conftest.lget("a", self.basedir.join('adir', 'b')) == 1
-        assert conftest.lget("b", self.basedir.join('adir', 'b')) == 2
-        assert py.test.raises(KeyError, 
-            'conftest.lget("b", self.basedir.join("a"))'
-        )
+        #assert conftest.lget("a", self.basedir.join('adir', 'b')) == 1
+        #assert conftest.lget("b", self.basedir.join('adir', 'b')) == 2
+        #assert py.test.raises(KeyError, 
+        #    'conftest.lget("b", self.basedir.join("a"))'
+        #)
 
     def test_value_access_with_init_one_conftest(self):
         conftest = Conftest(self.basedir.join('adir'))
         assert conftest.rget("a") == 1
-        assert conftest.lget("a") == 1
+        #assert conftest.lget("a") == 1
 
     def test_value_access_with_init_two_conftests(self):
         conftest = Conftest(self.basedir.join("adir", "b"))
         conftest.rget("a") == 1.5
-        conftest.lget("a") == 1
-        conftest.lget("b") == 1
+        #conftest.lget("a") == 1
+        #conftest.lget("b") == 1
 
 class TestConftestValueAccessInPackage(TestConftestValueAccessGlobal):
     def setup_class(cls):



More information about the pytest-commit mailing list