Skip to content

Commit 0f3d630

Browse files
authored
Merge pull request #4898 from shoyer/patch-1
Fix broken error message in pytester
2 parents 03ef546 + a0f652c commit 0f3d630

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog/4898.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``AttributeError: FixtureRequest has no 'confg' attribute`` bug in ``testdir.copy_example``.

src/_pytest/pytester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ def copy_example(self, name=None):
693693
else:
694694
raise LookupError(
695695
"{} cant be found as module or package in {}".format(
696-
func_name, example_dir.bestrelpath(self.request.confg.rootdir)
696+
func_name, example_dir.bestrelpath(self.request.config.rootdir)
697697
)
698698
)
699699
else:

0 commit comments

Comments
 (0)