From 6ca3c980bfce4968e36c63cb27a5e21331c3d290 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 18 Aug 2011 14:49:17 -0500 Subject: [PATCH] same as 6e94b1809f67: ENOTDIR is ENOENT on windows --- _pytest/assertion/rewrite.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_pytest/assertion/rewrite.py b/_pytest/assertion/rewrite.py index 0a8320e2f..662a7ccfd 100644 --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -106,7 +106,8 @@ class AssertionRewritingHook(object): # common case) or it's blocked by a non-dir node. In the # latter case, we'll ignore it in _write_pyc. pass - elif e == errno.ENOTDIR: + elif (e == errno.ENOTDIR or + sys.platform == "win32" and e == errno.ENOENT): # One of the path components was not a directory, likely # because we're in a zip file. write = False