diff --git a/changelog/4898.bugfix.rst b/changelog/4898.bugfix.rst new file mode 100644 index 000000000..43efee011 --- /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 fae243a50..a959516b0 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -693,7 +693,7 @@ class Testdir(object): 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: