[py-svn] r36840 - py/branch/conftest/py/test
hpk at codespeak.net
hpk at codespeak.net
Tue Jan 16 19:08:20 CET 2007
Author: hpk
Date: Tue Jan 16 19:08:19 2007
New Revision: 36840
Modified:
py/branch/conftest/py/test/config.py
Log:
removing all caching for now
Modified: py/branch/conftest/py/test/config.py
==============================================================================
--- py/branch/conftest/py/test/config.py (original)
+++ py/branch/conftest/py/test/config.py Tue Jan 16 19:08:19 2007
@@ -26,11 +26,11 @@
class Config(object):
""" central hub for dealing with configuration/initialization data. """
Option = optparse.Option
- _configs_cache = {}
def __init__(self):
self.option = optparse.Values()
- self._parser = optparse.OptionParser(usage="usage: %prog [options] [query] [filenames of tests]")
+ self._parser = optparse.OptionParser(
+ usage="usage: %prog [options] [query] [filenames of tests]")
self._initialconfigmodules = []
# class level attributes
@@ -46,11 +46,7 @@
if trydefaultconfig:
configpaths.append(defaultconfig)
for p in configpaths:
- try:
- mod = cls._configs_cache[p]
- except (KeyError, IndexError):
- mod = importconfig(p)
- cls._configs_cache[p] = mod
+ mod = importconfig(p)
try:
return getattr(mod, name)
except AttributeError:
@@ -188,15 +184,8 @@
Config._reset()
return config
-_config_paths_cache = {}
-
def guessconfigpaths(*paths):
""" return test configuration paths from skimming the args. """
- key = tuple(paths)
- try:
- return _config_paths_cache[key]
- except KeyError:
- pass
d = {}
l = []
for anchor in paths:
@@ -207,7 +196,6 @@
d[x] = True
l.append(x)
l.reverse()
- _config_paths_cache[key] = l
return l
def getanchorpaths(args):
More information about the pytest-commit
mailing list