Skip to content

Commit

Permalink
fixup! fixup! [WIP] -K to simply select/ignore cached nodeids
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Jan 10, 2020
1 parent 3ed6533 commit 6c6cfb5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/_pytest/cacheprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,8 @@ def pytest_collection_modifyitems(
other_items[item.nodeid] = item

relfspath = str(Path(item.fspath).relative_to(self.rootdir))
assert item.fspath.mtime() == self.cached_fspaths[relfspath]["mtime"], (
item,
relfspath,
)
if relfspath not in update_fspath:
update_fspath[relfspath] = {"mtime": item.fspath.mtime()}

items[:] = self._get_increasing_order(
new_items.values()
Expand All @@ -311,9 +309,8 @@ def pytest_collection_modifyitems(
if item.nodeid not in self.cached_nodeids:
new_items[item.nodeid] = item
relfspath = str(Path(item.fspath).relative_to(self.rootdir))
assert (
item.fspath.mtime() == self.cached_fspaths[relfspath]["mtime"]
), (item, relfspath)
if relfspath not in update_fspath:
update_fspath[relfspath] = {"mtime": item.fspath.mtime()}
self.cached_fspaths.update(update_fspath)
self.cached_nodeids.extend(new_items)

Expand Down

0 comments on commit 6c6cfb5

Please sign in to comment.