Skip to content

Commit 96f6846

Browse files
committed
13403: Disable assertion rewriting for external modules - add test for plugins
1 parent 884961b commit 96f6846

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/_pytest/assertion/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ def rootpath(self):
123123
return os.path.abspath(os.sep)
124124

125125

126-
127126
def install_importhook(config: Config) -> rewrite.AssertionRewritingHook:
128127
"""Try to install the rewrite hook, raise SystemError if it fails."""
129128
config.stash[assertstate_key] = AssertionState(config, "rewrite")

testing/test_assertrewrite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ def test_rootpath_base(self, pytester: Pytester, monkeypatch: MonkeyPatch) -> No
13091309
monkeypatch.chdir(pytester.path)
13101310
state = AssertionState(config, "rewrite")
13111311
assert state.rootpath == str(pytester.path)
1312-
new_rootpath = pytester.path + "/test"
1312+
new_rootpath = str(pytester.path) + "/test"
13131313
if not os.path.exists(new_rootpath):
13141314
os.mkdir(new_rootpath)
13151315
monkeypatch.chdir(new_rootpath)

0 commit comments

Comments
 (0)