Skip to content

Commit

Permalink
Merge pull request #21 from olegpidsadnyi/fix19
Browse files Browse the repository at this point in the history
fixes fixture function module name attribute
  • Loading branch information
olegpidsadnyi committed Apr 16, 2016
2 parents 8a6e7e6 + a3d5a4e commit 7b97e6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

1.1.6
-----

- fixes fixture function module name attribute (olegpidsadnyi)


1.1.5
-----

Expand Down
2 changes: 1 addition & 1 deletion pytest_factoryboy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""pytest-factoryboy public API."""
from .fixture import register, LazyFixture

__version__ = '1.1.5'
__version__ = '1.1.6'


__all__ = [
Expand Down
2 changes: 1 addition & 1 deletion pytest_factoryboy/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def make_fixture(name, module, func, args=None, **kwargs):
context.update(kwargs)
exec(FIXTURE_FUNC_FORMAT.format(name=name, deps=deps), context)
fixture_func = context[name]
fixture_func.__module__ = module
fixture_func.__module__ = module.__name__
fixture = pytest.fixture(fixture_func)
setattr(module, name, fixture)
return fixture
Expand Down

0 comments on commit 7b97e6e

Please sign in to comment.