Skip to content

Commit

Permalink
fix: resolve py.test --fixtures error due to __module__ somehow not c…
Browse files Browse the repository at this point in the history
…urrying to underlying fixture func
  • Loading branch information
theY4Kman committed Nov 2, 2020
1 parent 87aa99a commit adac34e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.


## [Unreleased]
### Fixed
- Resolve error in `py.test --fixtures` due to `__module__` not properly being curried to fixture func


## [1.2.2] — 2020-11-02
Expand Down
3 changes: 2 additions & 1 deletion pytest_lambda/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def contribute_to_parent(self, parent: Union[type, ModuleType], name: str, **kwa
self.set_fixture_func(name)

self.__name__ = name
self.__module__ = parent.__module__ if is_in_class else parent.__name__
self.__module__ = self.fixture_func.__module__ = (
parent.__module__ if is_in_class else parent.__name__)
self.parent = parent

# These properties are required in order to expose attributes stored on the
Expand Down

0 comments on commit adac34e

Please sign in to comment.