New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest suddenly cannot find module #3789

Closed
adamhrosenberg opened this Issue Aug 7, 2018 · 23 comments

Comments

Projects
None yet
7 participants
@adamhrosenberg

adamhrosenberg commented Aug 7, 2018

Hello. I use pytest on a CI server to test our software. We have been using pytest for years but with the latest update we have an error importing a module during pytest. My logic behind isolating this issue to pytest is: on the CI server, nothing has changed (same python, same code, same OS image) the updated version of pytest is the only thing that has changed.

original versions of what pytest passed with
platform linux2 -- Python 2.7.12, pytest-3.6.3, py-1.5.4, pluggy-0.6.0

current versions where I get failures:
platform linux2 -- Python 2.7.12, pytest-3.7.1, py-1.5.4, pluggy-0.7.1

Let's say the module that cannot import is called X. When within the directory of X, (where the _UnitTest directory is) running pytest allows all of the tests to pass. Changing directory back one layer (or anywhere outside of the X directory), now those tests from module X fail because the import statement failed.

Also on macOS I had all of the tests passing with pytest 3.6.3. Upgraded pytest, and now the tests related to module X fail. Many other modules import and work however module X does not. I have debugged a lot of it, and all of the paths look good, but it still fails to import. I'm not exactly sure what sets module X apart from the other dozens of module we use successfully.

I hope this makes sense and I can elaborate more if needed. I am not working in a virtualenv but I can put full pip lists in the comments if more is needed other then the versions I gave above.

Thank you

Adam

@Agi-dev

This comment has been minimized.

Show comment
Hide comment
@Agi-dev

Agi-dev Aug 9, 2018

Same issue for me, if I downgrade to version <7.1 it's working.

Agi-dev commented Aug 9, 2018

Same issue for me, if I downgrade to version <7.1 it's working.

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 9, 2018

@Agi-dev thank you for the feedback! glad to know i'm not alone

adamhrosenberg commented Aug 9, 2018

@Agi-dev thank you for the feedback! glad to know i'm not alone

@nicoddemus

This comment has been minimized.

Show comment
Hide comment
@nicoddemus

nicoddemus Aug 9, 2018

Member

Hi guys, sorry for the delay.

Does 3.7.0 work for you? It might help pin point the problem. Also if any of you can produce a reproducible use case it would be great.

Member

nicoddemus commented Aug 9, 2018

Hi guys, sorry for the delay.

Does 3.7.0 work for you? It might help pin point the problem. Also if any of you can produce a reproducible use case it would be great.

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 10, 2018

No worries. 3.7.0 does NOT work either. However, version 3.6.4 DOES work. I'm honestly very unsure how to reproduce this outside of my example. I can think about this at work tomorrow though. I'm not sure why it only happens to one of my modules out dozens.

I do know that it stems from my init file in that module. That is where the import statement is, which is where the error occurs. (all of my other modules that pass have an init like this as well)

@Agi-dev do you have any method to reproduce?

adamhrosenberg commented Aug 10, 2018

No worries. 3.7.0 does NOT work either. However, version 3.6.4 DOES work. I'm honestly very unsure how to reproduce this outside of my example. I can think about this at work tomorrow though. I'm not sure why it only happens to one of my modules out dozens.

I do know that it stems from my init file in that module. That is where the import statement is, which is where the error occurs. (all of my other modules that pass have an init like this as well)

@Agi-dev do you have any method to reproduce?

@Agi-dev

This comment has been minimized.

Show comment
Hide comment
@Agi-dev

Agi-dev Aug 10, 2018

Sorry, I've tried to reproduce it with simple example with no success despite the fact I've found a way to make my tests work again.
I've fixed the pb (for me) by deleting a __init__.py in the first sub directory of my tests directory. I'm not sure it's the way to go, I'm relatively new in Python programming.

Agi-dev commented Aug 10, 2018

Sorry, I've tried to reproduce it with simple example with no success despite the fact I've found a way to make my tests work again.
I've fixed the pb (for me) by deleting a __init__.py in the first sub directory of my tests directory. I'm not sure it's the way to go, I'm relatively new in Python programming.

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 10, 2018

I have tried doing that to no luck :(

adamhrosenberg commented Aug 10, 2018

I have tried doing that to no luck :(

@nicoddemus

This comment has been minimized.

Show comment
Hide comment
@nicoddemus

nicoddemus Aug 10, 2018

Member

We should release 3.7.2 soon (probably next week) with a few fixes in place regarding package collection (#3768, #3526), let's see if they end up solving this issue as well.

Member

nicoddemus commented Aug 10, 2018

We should release 3.7.2 soon (probably next week) with a few fixes in place regarding package collection (#3768, #3526), let's see if they end up solving this issue as well.

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg commented Aug 10, 2018

Sounds great

@highvelcty

This comment has been minimized.

Show comment
Hide comment
@highvelcty

highvelcty Aug 10, 2018

Here is a way to reproduce the problem:

Make a directory structure such as

/tmp/dir1/
/tmp/dir1/__init__.py
/tmp/dir1/dir1_1/
/tmp/dir1/dir1_1/__init__.py
/tmp/dir1/dir1_1/test_1_1.py
/tmp/dir1/dir1_1/test_1_1.py::test_1_1_case
/tmp/dir1/dir1_2/
/tmp/dir1/dir1_2/test_1_2.py
/tmp/dir1/dir1_2/test_1_2.py::test_1_2_case

then run pytest /tmp --collect-only

the output is

================================================ test session starts =================================================
platform linux -- Python 3.5.2, pytest-3.7.1, py-1.5.4, pluggy-0.7.1
rootdir: /, inifile:
collected 2 items                                                                                                    
<Package '/tmp/dir1'>
  <Package '/tmp/dir1/dir1_1'>
    <Module 'test_1_1.py'>
      <Function 'test_1_1_case'>
  <Module 'test_1_2.py'>
    <Function 'test_1_2_case'>

It seems there is a problem when mixing directories of tests with packages of tests. Note that there is no mention of dir1_2 in the output. I saw this starting with 3.7.0. I do not see the issue with 3.6.4.

Eric

highvelcty commented Aug 10, 2018

Here is a way to reproduce the problem:

Make a directory structure such as

/tmp/dir1/
/tmp/dir1/__init__.py
/tmp/dir1/dir1_1/
/tmp/dir1/dir1_1/__init__.py
/tmp/dir1/dir1_1/test_1_1.py
/tmp/dir1/dir1_1/test_1_1.py::test_1_1_case
/tmp/dir1/dir1_2/
/tmp/dir1/dir1_2/test_1_2.py
/tmp/dir1/dir1_2/test_1_2.py::test_1_2_case

then run pytest /tmp --collect-only

the output is

================================================ test session starts =================================================
platform linux -- Python 3.5.2, pytest-3.7.1, py-1.5.4, pluggy-0.7.1
rootdir: /, inifile:
collected 2 items                                                                                                    
<Package '/tmp/dir1'>
  <Package '/tmp/dir1/dir1_1'>
    <Module 'test_1_1.py'>
      <Function 'test_1_1_case'>
  <Module 'test_1_2.py'>
    <Function 'test_1_2_case'>

It seems there is a problem when mixing directories of tests with packages of tests. Note that there is no mention of dir1_2 in the output. I saw this starting with 3.7.0. I do not see the issue with 3.6.4.

Eric

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 10, 2018

Thank you! That's great

adamhrosenberg commented Aug 10, 2018

Thank you! That's great

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 10, 2018

@nicoddemus I still haven't found a way to reproduce it outside of my software package. We are open source so if you really want to test, you can get our code from here:

source
Here is some documentation on compiling:
documents

I can also test 3.7.2 when it comes out! Thanks for the feedback

adamhrosenberg commented Aug 10, 2018

@nicoddemus I still haven't found a way to reproduce it outside of my software package. We are open source so if you really want to test, you can get our code from here:

source
Here is some documentation on compiling:
documents

I can also test 3.7.2 when it comes out! Thanks for the feedback

jonozzz pushed a commit to jonozzz/pytest that referenced this issue Aug 10, 2018

@jonozzz

This comment has been minimized.

Show comment
Hide comment
@jonozzz

jonozzz Aug 10, 2018

Seems like a duplicate of #3768 . Can you try my pull request and see if that fixes your issue?

jonozzz commented Aug 10, 2018

Seems like a duplicate of #3768 . Can you try my pull request and see if that fixes your issue?

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 13, 2018

yea i can do that today

adamhrosenberg commented Aug 13, 2018

yea i can do that today

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 13, 2018

@jonozzz assuming i've followed your PR trail correctly, I should be cloning your fork of pytest-dev with this branch?
https://github.com/jonozzz/pytest/tree/fix-3768

Just installed...trying now.

Update: I still get the error

adamhrosenberg commented Aug 13, 2018

@jonozzz assuming i've followed your PR trail correctly, I should be cloning your fork of pytest-dev with this branch?
https://github.com/jonozzz/pytest/tree/fix-3768

Just installed...trying now.

Update: I still get the error

@jonozzz

This comment has been minimized.

Show comment
Hide comment
@jonozzz

jonozzz Aug 13, 2018

I would install it in a virtualenv like this:
pip install git+git://github.com/jonozzz/pytest.git@fix-3768

jonozzz commented Aug 13, 2018

I would install it in a virtualenv like this:
pip install git+git://github.com/jonozzz/pytest.git@fix-3768

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 14, 2018

yea that's pretty much what I did. no luck though, same error

adamhrosenberg commented Aug 14, 2018

yea that's pretty much what I did. no luck though, same error

@jonozzz

This comment has been minimized.

Show comment
Hide comment
@jonozzz

jonozzz Aug 14, 2018

@adamhrosenberg might be a different issue then. Can you work on a minimal set of repro steps that you could share? Or at least paste the command you're running and the complete traceback and maybe I can figure out what's going on.

jonozzz commented Aug 14, 2018

@adamhrosenberg might be a different issue then. Can you work on a minimal set of repro steps that you could share? Or at least paste the command you're running and the complete traceback and maybe I can figure out what's going on.

nicoddemus added a commit that referenced this issue Aug 16, 2018

Merge pull request #3802 from jonozzz/fix-3768
Fix test collection from packages mixed with directories. #3768 and #3789

@nicoddemus nicoddemus closed this Aug 16, 2018

@adamhrosenberg

This comment has been minimized.

Show comment
Hide comment
@adamhrosenberg

adamhrosenberg Aug 18, 2018

Not sure why this was closed, the PR still doesn't fix my problem. Sorry I wasn't able to get back to you right away it was a busy week. I'll post the traceback below.

I run a normal pytest, and I'm told that the module radiation_pressure cannot be found. It gets to the init file which has from radiation_pressure import *. And it bugs out there. I posted the link to our software above.

adamhrosenberg commented Aug 18, 2018

Not sure why this was closed, the PR still doesn't fix my problem. Sorry I wasn't able to get back to you right away it was a busy week. I'll post the traceback below.

I run a normal pytest, and I'm told that the module radiation_pressure cannot be found. It gets to the init file which has from radiation_pressure import *. And it bugs out there. I posted the link to our software above.

@nicoddemus

This comment has been minimized.

Show comment
Hide comment
@nicoddemus

nicoddemus Aug 18, 2018

Member

Hi @adamhrosenberg, if this is still is an issue we can re-open this, no problem! Did you try out with the recently released 3.7.2?

Member

nicoddemus commented Aug 18, 2018

Hi @adamhrosenberg, if this is still is an issue we can re-open this, no problem! Did you try out with the recently released 3.7.2?

@jonozzz

This comment has been minimized.

Show comment
Hide comment
@jonozzz

jonozzz Aug 18, 2018

I think this has more to do with PR #3797 because __init__.py is hardcoded in python_files. It will error out when there's a bad __init__.py somewhere, whereas in 3.6.x it'd just ignore it.

jonozzz commented Aug 18, 2018

I think this has more to do with PR #3797 because __init__.py is hardcoded in python_files. It will error out when there's a bad __init__.py somewhere, whereas in 3.6.x it'd just ignore it.

sfdye added a commit to pydanny/cookiecutter-django that referenced this issue Aug 19, 2018

Update pytest to 3.7.2 (#1755)
This PR updates [pytest](https://pypi.org/project/pytest) from **3.7.1** to **3.7.2**.



<details>
  <summary>Changelog</summary>
  
  
   ### 3.7.2
   ```
   =========================

Bug Fixes
---------

- `3671 &lt;https://github.com/pytest-dev/pytest/issues/3671&gt;`_: Fix ``filterwarnings`` not being registered as a builtin mark.


- `3768 &lt;https://github.com/pytest-dev/pytest/issues/3768&gt;`_, `3789 &lt;https://github.com/pytest-dev/pytest/issues/3789&gt;`_: Fix test collection from packages mixed with normal directories.


- `3771 &lt;https://github.com/pytest-dev/pytest/issues/3771&gt;`_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``.


- `3774 &lt;https://github.com/pytest-dev/pytest/issues/3774&gt;`_: Fix bug where decorated fixtures would lose functionality (for example ``mock.patch``).


- `3775 &lt;https://github.com/pytest-dev/pytest/issues/3775&gt;`_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``.


- `3788 &lt;https://github.com/pytest-dev/pytest/issues/3788&gt;`_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``.


- `3804 &lt;https://github.com/pytest-dev/pytest/issues/3804&gt;`_: Fix traceback reporting for exceptions with ``__cause__`` cycles.



Improved Documentation
----------------------

- `3746 &lt;https://github.com/pytest-dev/pytest/issues/3746&gt;`_: Add documentation for ``metafunc.config`` that had been mistakenly hidden.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Changelog: https://pyup.io/changelogs/pytest/
  - Homepage: http://pytest.org
</details>

cmccandless added a commit to cmccandless/tools that referenced this issue Aug 20, 2018

Update pytest to 3.7.2 (#25)
This PR updates [pytest](https://pypi.org/project/pytest) from **3.7.1** to **3.7.2**.



<details>
  <summary>Changelog</summary>
  
  
   ### 3.7.2
   ```
   =========================

Bug Fixes
---------

- `3671 &lt;https://github.com/pytest-dev/pytest/issues/3671&gt;`_: Fix ``filterwarnings`` not being registered as a builtin mark.


- `3768 &lt;https://github.com/pytest-dev/pytest/issues/3768&gt;`_, `3789 &lt;https://github.com/pytest-dev/pytest/issues/3789&gt;`_: Fix test collection from packages mixed with normal directories.


- `3771 &lt;https://github.com/pytest-dev/pytest/issues/3771&gt;`_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``.


- `3774 &lt;https://github.com/pytest-dev/pytest/issues/3774&gt;`_: Fix bug where decorated fixtures would lose functionality (for example ``mock.patch``).


- `3775 &lt;https://github.com/pytest-dev/pytest/issues/3775&gt;`_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``.


- `3788 &lt;https://github.com/pytest-dev/pytest/issues/3788&gt;`_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``.


- `3804 &lt;https://github.com/pytest-dev/pytest/issues/3804&gt;`_: Fix traceback reporting for exceptions with ``__cause__`` cycles.



Improved Documentation
----------------------

- `3746 &lt;https://github.com/pytest-dev/pytest/issues/3746&gt;`_: Add documentation for ``metafunc.config`` that had been mistakenly hidden.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Changelog: https://pyup.io/changelogs/pytest/
  - Homepage: http://pytest.org
</details>

cmccandless added a commit to cmccandless/multisite that referenced this issue Aug 20, 2018

Update pytest to 3.7.2 (#8)
This PR updates [pytest](https://pypi.org/project/pytest) from **3.6.4** to **3.7.2**.



<details>
  <summary>Changelog</summary>
  
  
   ### 3.7.2
   ```
   =========================

Bug Fixes
---------

- `3671 &lt;https://github.com/pytest-dev/pytest/issues/3671&gt;`_: Fix ``filterwarnings`` not being registered as a builtin mark.


- `3768 &lt;https://github.com/pytest-dev/pytest/issues/3768&gt;`_, `3789 &lt;https://github.com/pytest-dev/pytest/issues/3789&gt;`_: Fix test collection from packages mixed with normal directories.


- `3771 &lt;https://github.com/pytest-dev/pytest/issues/3771&gt;`_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``.


- `3774 &lt;https://github.com/pytest-dev/pytest/issues/3774&gt;`_: Fix bug where decorated fixtures would lose functionality (for example ``mock.patch``).


- `3775 &lt;https://github.com/pytest-dev/pytest/issues/3775&gt;`_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``.


- `3788 &lt;https://github.com/pytest-dev/pytest/issues/3788&gt;`_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``.


- `3804 &lt;https://github.com/pytest-dev/pytest/issues/3804&gt;`_: Fix traceback reporting for exceptions with ``__cause__`` cycles.



Improved Documentation
----------------------

- `3746 &lt;https://github.com/pytest-dev/pytest/issues/3746&gt;`_: Add documentation for ``metafunc.config`` that had been mistakenly hidden.
   ```
   
  
  
   ### 3.7.1
   ```
   =========================

Bug Fixes
---------

- `3473 &lt;https://github.com/pytest-dev/pytest/issues/3473&gt;`_: Raise immediately if ``approx()`` is given an expected value of a type it doesn&#39;t understand (e.g. strings, nested dicts, etc.).


- `3712 &lt;https://github.com/pytest-dev/pytest/issues/3712&gt;`_: Correctly represent the dimensions of an numpy array when calling ``repr()`` on ``approx()``.

- `3742 &lt;https://github.com/pytest-dev/pytest/issues/3742&gt;`_: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute &#39;_collectfile&#39;``.

- `3745 &lt;https://github.com/pytest-dev/pytest/issues/3745&gt;`_: Display the absolute path if ``cache_dir`` is not relative to the ``rootdir`` instead of failing.


- `3747 &lt;https://github.com/pytest-dev/pytest/issues/3747&gt;`_: Fix compatibility problem with plugins and the warning code issued by fixture functions when they are called directly.


- `3748 &lt;https://github.com/pytest-dev/pytest/issues/3748&gt;`_: Fix infinite recursion in ``pytest.approx`` with arrays in ``numpy&lt;1.13``.


- `3757 &lt;https://github.com/pytest-dev/pytest/issues/3757&gt;`_: Pin pathlib2 to ``&gt;=2.2.0`` as we require ``__fspath__`` support.


- `3763 &lt;https://github.com/pytest-dev/pytest/issues/3763&gt;`_: Fix ``TypeError`` when the assertion message is ``bytes`` in python 3.
   ```
   
  
  
   ### 3.7.0
   ```
   =========================

Deprecations and Removals
-------------------------

- `2639 &lt;https://github.com/pytest-dev/pytest/issues/2639&gt;`_: ``pytest_namespace`` has been deprecated.

  See the documentation for ``pytest_namespace`` hook for suggestions on how to deal
  with this in plugins which use this functionality.


- `3661 &lt;https://github.com/pytest-dev/pytest/issues/3661&gt;`_: Calling a fixture function directly, as opposed to request them in a test function, now issues a ``RemovedInPytest4Warning``. It will be changed into an error in pytest ``4.0``.

  This is a great source of confusion to new users, which will often call the fixture functions and request them from test functions interchangeably, which breaks the fixture resolution model.



Features
--------

- `2283 &lt;https://github.com/pytest-dev/pytest/issues/2283&gt;`_: New ``package`` fixture scope: fixtures are finalized when the last test of a *package* finishes. This feature is considered **experimental**, so use it sparingly.


- `3576 &lt;https://github.com/pytest-dev/pytest/issues/3576&gt;`_: ``Node.add_marker`` now supports an ``append=True/False`` parameter to determine whether the mark comes last (default) or first.


- `3579 &lt;https://github.com/pytest-dev/pytest/issues/3579&gt;`_: Fixture ``caplog`` now has a ``messages`` property, providing convenient access to the format-interpolated log messages without the extra data provided by the formatter/handler.


- `3610 &lt;https://github.com/pytest-dev/pytest/issues/3610&gt;`_: New ``--trace`` option to enter the debugger at the start of a test.


- `3623 &lt;https://github.com/pytest-dev/pytest/issues/3623&gt;`_: Introduce ``pytester.copy_example`` as helper to do acceptance tests against examples from the project.



Bug Fixes
---------

- `2220 &lt;https://github.com/pytest-dev/pytest/issues/2220&gt;`_: Fix a bug where fixtures overridden by direct parameters (for example parametrization) were being instantiated even if they were not being used by a test.


- `3695 &lt;https://github.com/pytest-dev/pytest/issues/3695&gt;`_: Fix ``ApproxNumpy`` initialisation argument mixup, ``abs`` and ``rel`` tolerances were flipped causing strange comparsion results.
  Add tests to check ``abs`` and ``rel`` tolerances for ``np.array`` and test for expecting ``nan`` with ``np.array()``


- `980 &lt;https://github.com/pytest-dev/pytest/issues/980&gt;`_: Fix truncated locals output in verbose mode.



Improved Documentation
----------------------

- `3295 &lt;https://github.com/pytest-dev/pytest/issues/3295&gt;`_: Correct the usage documentation of ``--last-failed-no-failures`` by adding the missing ``--last-failed`` argument in the presented examples, because they are misleading and lead to think that the missing argument is not needed.



Trivial/Internal Changes
------------------------

- `3519 &lt;https://github.com/pytest-dev/pytest/issues/3519&gt;`_: Now a ``README.md`` file is created in ``.pytest_cache`` to make it clear why the directory exists.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Changelog: https://pyup.io/changelogs/pytest/
  - Homepage: http://pytest.org
</details>

bors bot added a commit to rehandalal/therapist that referenced this issue Aug 20, 2018

Merge #28
28: Update pytest to 3.7.2 r=rehandalal a=pyup-bot


This PR updates [pytest](https://pypi.org/project/pytest) from **3.7.1** to **3.7.2**.



<details>
  <summary>Changelog</summary>
  
  
   ### 3.7.2
   ```
   =========================

Bug Fixes
---------

- `3671 &lt;https://github.com/pytest-dev/pytest/issues/3671&gt;`_: Fix ``filterwarnings`` not being registered as a builtin mark.


- `3768 &lt;https://github.com/pytest-dev/pytest/issues/3768&gt;`_, `3789 &lt;https://github.com/pytest-dev/pytest/issues/3789&gt;`_: Fix test collection from packages mixed with normal directories.


- `3771 &lt;https://github.com/pytest-dev/pytest/issues/3771&gt;`_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``.


- `3774 &lt;https://github.com/pytest-dev/pytest/issues/3774&gt;`_: Fix bug where decorated fixtures would lose functionality (for example ``mock.patch``).


- `3775 &lt;https://github.com/pytest-dev/pytest/issues/3775&gt;`_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``.


- `3788 &lt;https://github.com/pytest-dev/pytest/issues/3788&gt;`_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``.


- `3804 &lt;https://github.com/pytest-dev/pytest/issues/3804&gt;`_: Fix traceback reporting for exceptions with ``__cause__`` cycles.



Improved Documentation
----------------------

- `3746 &lt;https://github.com/pytest-dev/pytest/issues/3746&gt;`_: Add documentation for ``metafunc.config`` that had been mistakenly hidden.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Changelog: https://pyup.io/changelogs/pytest/
  - Homepage: http://pytest.org
</details>



Co-authored-by: pyup-bot <github-bot@pyup.io>
@jonozzz

This comment has been minimized.

Show comment
Hide comment
@jonozzz

jonozzz Aug 21, 2018

@adamhrosenberg can you post that traceback, hopefully that'll give me some clues on what's going on.

jonozzz commented Aug 21, 2018

@adamhrosenberg can you post that traceback, hopefully that'll give me some clues on what's going on.

@burg

This comment has been minimized.

Show comment
Hide comment
@burg

burg Aug 22, 2018

I am also encountering a similar sounding issue on 3.7.2. I'll try to figure out a reduced test case.

burg commented Aug 22, 2018

I am also encountering a similar sounding issue on 3.7.2. I'll try to figure out a reduced test case.

@CrimsonGlory

This comment has been minimized.

Show comment
Hide comment
@CrimsonGlory

CrimsonGlory Aug 23, 2018

3.7.2 has fixed the issue for me.

CrimsonGlory commented Aug 23, 2018

3.7.2 has fixed the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment