def test_check_collect_hashes(): |
tmp = py.test.ensuretemp("check_collect_hashes") |
tmp.ensure("test_one.py").write(py.code.Source(""" |
def test_1(): |
pass |
|
def test_2(): |
pass |
""")) |
tmp.ensure("test_two.py").write(py.code.Source(""" |
def test_1(): |
pass |
|
def test_2(): |
pass |
""")) |
tmp.ensure("__init__.py") |
col = py.test.collect.Directory(tmp) |
l = list(col._tryiter()) |
assert len(l) == 4 |
for numi, i in enumerate(l): |
for numj, j in enumerate(l): |
if numj != numi: |
assert hash(i) != hash(j) |
-> assert i != j |