diff --git a/changelog/4898.bugfix.rst b/changelog/4898.bugfix.rst new file mode 100644 index 00000000000..43efee01142 --- /dev/null +++ b/changelog/4898.bugfix.rst @@ -0,0 +1 @@ +Fix ``AttributeError: FixtureRequest has no 'confg' attribute`` bug in ``testdir.copy_example``. diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index fae243a50ca..a959516b092 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -693,7 +693,7 @@ def copy_example(self, name=None): else: raise LookupError( "{} cant be found as module or package in {}".format( - func_name, example_dir.bestrelpath(self.request.confg.rootdir) + func_name, example_dir.bestrelpath(self.request.config.rootdir) ) ) else: