[svn r38568] improving r38560 a bit
--HG-- branch : trunk
This commit is contained in:
parent
6294a4b189
commit
a43ff3108f
|
@ -65,10 +65,8 @@ class Collector(object):
|
||||||
return "<%s %r>" %(self.__class__.__name__, self.name)
|
return "<%s %r>" %(self.__class__.__name__, self.name)
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
#try:
|
# XXX a rather strict check for now to not confuse
|
||||||
# return self.name == other.name and self.parent == other.parent
|
# the SetupState.prepare() logic
|
||||||
#except AttributeError:
|
|
||||||
# return False
|
|
||||||
return self is other
|
return self is other
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
|
@ -359,7 +357,7 @@ class Module(FSCollector, PyCollectorMixin):
|
||||||
if res is None:
|
if res is None:
|
||||||
attr = getattr(self.obj, name, None)
|
attr = getattr(self.obj, name, None)
|
||||||
if attr is not None:
|
if attr is not None:
|
||||||
return self.makeitem(name, attr, usefilters=False)
|
res = self.makeitem(name, attr, usefilters=False)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def startcapture(self):
|
def startcapture(self):
|
||||||
|
|
|
@ -397,8 +397,7 @@ class TestConfigColitems:
|
||||||
assert trail[0] == a.relto(config.topdir)
|
assert trail[0] == a.relto(config.topdir)
|
||||||
assert trail[1] == ('trail.py',)
|
assert trail[1] == ('trail.py',)
|
||||||
col2 = config._getcollector(trail)
|
col2 = config._getcollector(trail)
|
||||||
assert [i.name for i in col2.listchain()] == \
|
assert col2.listnames() == col.listnames()
|
||||||
[i.name for i in col.listchain()]
|
|
||||||
|
|
||||||
def test_get_collector_trail_topdir_and_beyond(self):
|
def test_get_collector_trail_topdir_and_beyond(self):
|
||||||
config = py.test.config._reparse([self.tmpdir])
|
config = py.test.config._reparse([self.tmpdir])
|
||||||
|
|
Loading…
Reference in New Issue