From f8350c63041c8ba042c105fcbf78c9207d3b7dc5 Mon Sep 17 00:00:00 2001 From: turturica Date: Sat, 21 Apr 2018 19:51:33 -0700 Subject: [PATCH] Fix an issue that popped up only on Windows. --- _pytest/nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/nodes.py b/_pytest/nodes.py index dfe63b220..33752064f 100644 --- a/_pytest/nodes.py +++ b/_pytest/nodes.py @@ -329,7 +329,7 @@ class FSCollector(Collector): if not nodeid: nodeid = _check_initialpaths_for_relpath(session, fspath) - if os.sep != SEP: + if nodeid and os.sep != SEP: nodeid = nodeid.replace(os.sep, SEP) super(FSCollector, self).__init__(name, parent, config, session, nodeid=nodeid, fspath=fspath)