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

Test works normally but fails under pytest with assertion rewriting #4412

Closed
oscarbenjamin opened this Issue Nov 17, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@oscarbenjamin

oscarbenjamin commented Nov 17, 2018

Given a test file p.py containing:

def test_add():
    add = lambda *t: sum(t)
    l = range(8)
    e = iter(l)
    assert sum(l[:4]) == add(*[next(e) for j in range(4)])

the test doesn't work under pytest with assertion rewriting. Note that the expression on the rhs of == will return a different result when evaluated a second time. The first time it is evaluated it will give 6 and the second time 22.

The test passes (as expected) when imported normally:

>>> import p
>>> p.test_add()

It also works under pytest without assertion rewriting

$ pytest p.py --assert=plain
==================================================================== test session starts =====================================================================
platform darwin -- Python 3.6.2, pytest-3.10.0, py-1.7.0, pluggy-0.8.0
rootdir: /Users/enojb/current/sympy/sympy, inifile:
plugins: faulthandler-1.5.0
collected 1 item                                                                                                                                             

p.py .                                                                                                                                                 [100%]

================================================================== 1 passed in 0.01 seconds ==================================================================

However it fails under pytest with assertion rewriting

$ pytest p.py
==================================================================== test session starts =====================================================================
platform darwin -- Python 3.6.2, pytest-3.10.0, py-1.7.0, pluggy-0.8.0
rootdir: /Users/enojb/current/sympy/sympy, inifile:
plugins: faulthandler-1.5.0
collected 1 item                                                                                                                                             

p.py F                                                                                                                                                 [100%]

========================================================================== FAILURES ==========================================================================
__________________________________________________________________________ test_add __________________________________________________________________________

    def test_add():
        add = lambda *t: sum(t)
        l = range(8)
        e = iter(l)
>       assert sum(l[:4]) == add(*[next(e) for j in range(4)])
E       assert 6 == 22
E        +  where 6 = sum(range(0, 4))
E        +  and   22 = <function test_add.<locals>.<lambda> at 0x10454e048>(*[0, 1, 2, 3])

p.py:6: AssertionError
================================================================== 1 failed in 0.08 seconds ==================================================================
@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Nov 17, 2018

what's even more surprising is, that the debugged values from the arguments are actually correct at least for display

@asottile

This comment has been minimized.

Member

asottile commented Nov 17, 2018

Here's the rewritten code:


import builtins as @py_builtins
import _pytest.assertion.rewrite as @pytest_ar

def test_add():
    add = (lambda *t: sum(t))
    l = range(8)
    e = iter(l)
    @py_assert1 = l[:4]
    @py_assert3 = sum(@py_assert1)
    @py_assert7 = [next(e) for j in range(4)]
    @py_assert9 = add(*[next(e) for j in range(4)])
    @py_assert5 = (@py_assert3 == @py_assert9)
    if (not @py_assert5):
        @py_format11 = (@pytest_ar._call_reprcompare(('==',), (@py_assert5,), ('%(py4)s\n{%(py4)s = %(py0)s(%(py2)s)\n} == %(py10)s\n{%(py10)s = %(py6)s(*%(py8)s)\n}',), (@py_assert3, @py_assert9)) % {
            'py0': (@pytest_ar._saferepr(sum) if (('sum' in @py_builtins.locals()) or @pytest_ar._should_repr_global_name(sum)) else 'sum'),
            'py2': @pytest_ar._saferepr(@py_assert1),
            'py4': @pytest_ar._saferepr(@py_assert3),
            'py6': (@pytest_ar._saferepr(add) if (('add' in @py_builtins.locals()) or @pytest_ar._should_repr_global_name(add)) else 'add'),
            'py8': @pytest_ar._saferepr(@py_assert7),
            'py10': @pytest_ar._saferepr(@py_assert9),
        })
        @py_format13 = (('' + 'assert %(py12)s') % {
            'py12': @py_format11,
        })
        raise AssertionError(@pytest_ar._format_explanation(@py_format13))
    @py_assert1 = @py_assert3 = @py_assert5 = @py_assert7 = @py_assert9 = None

retrieved with this patch:

         state.trace("failed to parse: %r" % (fn,))
         return None, None
     rewrite_asserts(tree, fn, config)
+    import astunparse
+    with open(fn.strpath + '.rewritten', 'w') as f:
+        f.write(astunparse.unparse(tree))
     try:
         co = compile(tree, fn.strpath, "exec", dont_inherit=True)
     except SyntaxError:

Here's an ever-so-slightly shorter reproduction:

def test():
    f = lambda x: x
    x = iter([1, 2, 3])
    assert 2 * next(x) == f(*[next(x)])
import builtins as @py_builtins
import _pytest.assertion.rewrite as @pytest_ar

def test():
    f = (lambda x: x)
    x = iter([1, 2, 3])
    @py_assert0 = 2
    @py_assert4 = next(x)
    @py_assert6 = (@py_assert0 * @py_assert4)
    @py_assert9 = [next(x)]
    @py_assert11 = f(*[next(x)])
    @py_assert7 = (@py_assert6 == @py_assert11)
    if (not @py_assert7):
        @py_format13 = (@pytest_ar._call_reprcompare(('==',), (@py_assert7,), ('(%(py1)s * %(py5)s\n{%(py5)s = %(py2)s(%(py3)s)\n}) == %(py12)s\n{%(py12)s = %(py8)s(*%(py10)s)\n}',), (@py_assert6, @py_assert11)) % {
            'py1': @pytest_ar._saferepr(@py_assert0),
            'py2': (@pytest_ar._saferepr(next) if (('next' in @py_builtins.locals()) or @pytest_ar._should_repr_global_name(next)) else 'next'),
            'py3': (@pytest_ar._saferepr(x) if (('x' in @py_builtins.locals()) or @pytest_ar._should_repr_global_name(x)) else 'x'),
            'py5': @pytest_ar._saferepr(@py_assert4),
            'py8': (@pytest_ar._saferepr(f) if (('f' in @py_builtins.locals()) or @pytest_ar._should_repr_global_name(f)) else 'f'),
            'py10': @pytest_ar._saferepr(@py_assert9),
            'py12': @pytest_ar._saferepr(@py_assert11),
        })
        @py_format15 = (('' + 'assert %(py14)s') % {
            'py14': @py_format13,
        })
        raise AssertionError(@pytest_ar._format_explanation(@py_format15))
    @py_assert0 = @py_assert4 = @py_assert6 = @py_assert7 = @py_assert9 = @py_assert11 = None
@asottile

This comment has been minimized.

Member

asottile commented Nov 17, 2018

#4414 has my proposed fix for this!

@oscarbenjamin

This comment has been minimized.

oscarbenjamin commented Nov 18, 2018

Thanks for the quick work!

@oscarbenjamin

This comment has been minimized.

oscarbenjamin commented Nov 18, 2018

So it turns out that the fix in #4414 works for the simplified test case I brought to this issue but not for my actual problem which is this function here

You can reproduce my original problem with

$ git clone https://github.com/sympy/sympy.git
$ cd sympy/
$ pytest sympy/integrals/tests/test_integrals.py -k test_series

The function in question looks like

def test_series():
    from sympy.abc import x
    i = Integral(cos(x), (x, x))
    e = i.lseries(x)
    assert i.nseries(x, n=8).removeO() == Add(*[next(e) for j in range(4)])
@asottile

This comment has been minimized.

Member

asottile commented Nov 18, 2018

It seems to work for me (?)

$ pytest sympy/integrals/tests/test_integrals.py -k test_series
============================= test session starts ==============================
platform linux -- Python 3.6.6, pytest-4.0.1.dev17+ga281d662, py-1.7.0, pluggy-0.8.0
architecture: 64-bit
cache:        yes
ground types: python 

rootdir: /tmp/sympy, inifile:
collected 138 items / 137 deselected                                           

sympy/integrals/tests/test_integrals.py .                                [100%]

=================== 1 passed, 137 deselected in 1.66 seconds ===================

Are you sure you're using the bleeding edge version of pytest? we haven't made a release yet with that fix

@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Nov 18, 2018

@oscarbenjamin did you clear your pyc file cache?

@asottile we might need an extra magic marker so pytest can learn to distinguish between different versions of its ast rewriting

@oscarbenjamin

This comment has been minimized.

oscarbenjamin commented Nov 18, 2018

Thanks guys! I tested with a fresh clone of sympy and pytest and it worked fine.

Going back to my previous setup I fixed it by deleting __pycache__:

$ pytest sympy/integrals/tests/test_integrals.py -k test_series
==================================================================== test session starts =====================================================================
platform darwin -- Python 3.7.1, pytest-4.0.1.dev15+gcdbe2299, py-1.7.0, pluggy-0.8.0
architecture: 64-bit
cache:        yes
ground types: python 

rootdir: /Users/enojb/current/sympy/sympy, inifile:
plugins: xdist-1.24.1, forked-0.2
collected 138 items / 137 deselected                                                                                                                         

sympy/integrals/tests/test_integrals.py F                                                                                                              [100%]

========================================================================== FAILURES ==========================================================================
________________________________________________________________________ test_series _________________________________________________________________________

    def test_series():
        from sympy.abc import x
        i = Integral(cos(x), (x, x))
        e = i.lseries(x)
>       assert i.nseries(x, n=8).removeO() == Add(*[next(e) for j in range(4)])
E       assert -x**7/5040 + x**5/120 - x**3/6 + x == -x**15/1307674368000 + x**13/6227020800 - x**11/39916800 + x**9/362880
E        +  where -x**7/5040 + x**5/120 - x**3/6 + x = <bound method Add.removeO of x - x**3/6 + x**5/120 - x**7/5040 + O(x**9)>()
E        +    where <bound method Add.removeO of x - x**3/6 + x**5/120 - x**7/5040 + O(x**9)> = x - x**3/6 + x**5/120 - x**7/5040 + O(x**9).removeO
E        +      where x - x**3/6 + x**5/120 - x**7/5040 + O(x**9) = <bound method Expr.nseries of Integral(cos(x), (x, x))>(x, n=8)
E        +        where <bound method Expr.nseries of Integral(cos(x), (x, x))> = Integral(cos(x), (x, x)).nseries
E        +  and   -x**15/1307674368000 + x**13/6227020800 - x**11/39916800 + x**9/362880 = Add(*[x, -x**3/6, x**5/120, -x**7/5040])

sympy/integrals/tests/test_integrals.py:916: AssertionError
                                                                       DO *NOT* COMMIT!                                                                       
========================================================== 1 failed, 137 deselected in 1.34 seconds ==========================================================
$ rm -r sympy/integrals/tests/__pycache__/
$ pytest sympy/integrals/tests/test_integrals.py -k test_series
==================================================================== test session starts =====================================================================
platform darwin -- Python 3.7.1, pytest-4.0.1.dev15+gcdbe2299, py-1.7.0, pluggy-0.8.0
architecture: 64-bit
cache:        yes
ground types: python 

rootdir: /Users/enojb/current/sympy/sympy, inifile:
plugins: xdist-1.24.1, forked-0.2
collected 138 items / 137 deselected                                                                                                                         

sympy/integrals/tests/test_integrals.py .                                                                                                              [100%]

========================================================== 1 passed, 137 deselected in 1.83 seconds ==========================================================

So yes, this issue is fixed.

peterbe added a commit to mozilla-services/tecken that referenced this issue Nov 26, 2018

Update pytest to 4.0.1 (#1359)
This PR updates [pytest](https://pypi.org/project/pytest) from **4.0.0** to **4.0.1**.



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

Bug Fixes
---------

- `3952 &lt;https://github.com/pytest-dev/pytest/issues/3952&gt;`_: Display warnings before &quot;short test summary info&quot; again, but still later warnings in the end.


- `4386 &lt;https://github.com/pytest-dev/pytest/issues/4386&gt;`_: Handle uninitialized exceptioninfo in repr/str.


- `4393 &lt;https://github.com/pytest-dev/pytest/issues/4393&gt;`_: Do not create ``.gitignore``/``README.md`` files in existing cache directories.


- `4400 &lt;https://github.com/pytest-dev/pytest/issues/4400&gt;`_: Rearrange warning handling for the yield test errors so the opt-out in 4.0.x correctly works.


- `4405 &lt;https://github.com/pytest-dev/pytest/issues/4405&gt;`_: Fix collection of testpaths with ``--pyargs``.


- `4412 &lt;https://github.com/pytest-dev/pytest/issues/4412&gt;`_: Fix assertion rewriting involving ``Starred`` + side-effects.


- `4425 &lt;https://github.com/pytest-dev/pytest/issues/4425&gt;`_: Ensure we resolve the absolute path when the given ``--basetemp`` is a relative path.



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

- `4315 &lt;https://github.com/pytest-dev/pytest/issues/4315&gt;`_: Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check.


- `4440 &lt;https://github.com/pytest-dev/pytest/issues/4440&gt;`_: Adjust the stack level of some internal pytest warnings.
   ```
   
  
</details>


 

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

bors bot added a commit to mozilla/normandy that referenced this issue Nov 26, 2018

Merge #1629
1629: Scheduled weekly dependency update for week 47 r=mythmon a=pyup-bot






### Update [botocore](https://pypi.org/project/botocore) from **1.12.47** to **1.12.51**.


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

* api-change:``amplify``: Update amplify client to latest version
* api-change:``transfer``: Update transfer client to latest version
* api-change:``snowball``: Update snowball client to latest version
* api-change:``robomaker``: Update robomaker client to latest version
* api-change:``s3``: Update s3 client to latest version
* api-change:``datasync``: Update datasync client to latest version
   ```
   
  
  
   ### 1.12.50
   ```
   =======

* api-change:``rekognition``: Update rekognition client to latest version
   ```
   
  
  
   ### 1.12.49
   ```
   =======

* api-change:``autoscaling-plans``: Update autoscaling-plans client to latest version
* api-change:``xray``: Update xray client to latest version
* api-change:``devicefarm``: Update devicefarm client to latest version
* api-change:``ssm``: Update ssm client to latest version
* api-change:``medialive``: Update medialive client to latest version
* api-change:``redshift``: Update redshift client to latest version
* api-change:``rds-data``: Update rds-data client to latest version
* api-change:``appsync``: Update appsync client to latest version
* api-change:``cloudwatch``: Update cloudwatch client to latest version
* api-change:``quicksight``: Update quicksight client to latest version
* api-change:``cloudfront``: Update cloudfront client to latest version
   ```
   
  
  
   ### 1.12.48
   ```
   =======

* api-change:``lightsail``: Update lightsail client to latest version
* api-change:``workspaces``: Update workspaces client to latest version
* api-change:``workdocs``: Update workdocs client to latest version
* api-change:``batch``: Update batch client to latest version
* api-change:``ec2``: Update ec2 client to latest version
* api-change:``devicefarm``: Update devicefarm client to latest version
* api-change:``rds``: Update rds client to latest version
* api-change:``cloudformation``: Update cloudformation client to latest version
* api-change:``lambda``: Update lambda client to latest version
* api-change:``config``: Update config client to latest version
* api-change:``cloudtrail``: Update cloudtrail client to latest version
* api-change:``mediaconvert``: Update mediaconvert client to latest version
* api-change:``iot``: Update iot client to latest version
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/botocore
  - Changelog: https://pyup.io/changelogs/botocore/
  - Repo: https://github.com/boto/botocore
</details>





### Update [Pygments](https://pypi.org/project/Pygments) from **2.2.0** to **2.3.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 2.3.0
   ```
   -------------
(released Nov 25, 2018)

- Added lexers:

  * Fennel (PR783)
  * HLSL (PR675)

- Updated lexers:

  * Dockerfile (PR714)

- Minimum Python versions changed to 2.7 and 3.5
- Added support for Python 3.7 generator changes (PR772)
- Fix incorrect token type in SCSS for single-quote strings (1322)
- Use `terminal256` formatter if `TERM` contains `256` (PR666)
- Fix incorrect handling of GitHub style fences in Markdown (PR741, 1389)
- Fix `%a` not being highlighted in Python3 strings (PR727)
   ```
   
  
</details>


 

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





### Update [boto3](https://pypi.org/project/boto3) from **1.9.47** to **1.9.51**.


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

* api-change:``amplify``: [``botocore``] Update amplify client to latest version
* api-change:``transfer``: [``botocore``] Update transfer client to latest version
* api-change:``snowball``: [``botocore``] Update snowball client to latest version
* api-change:``robomaker``: [``botocore``] Update robomaker client to latest version
* api-change:``s3``: [``botocore``] Update s3 client to latest version
* api-change:``datasync``: [``botocore``] Update datasync client to latest version
   ```
   
  
  
   ### 1.9.50
   ```
   ======

* api-change:``rekognition``: [``botocore``] Update rekognition client to latest version
   ```
   
  
  
   ### 1.9.49
   ```
   ======

* api-change:``autoscaling-plans``: [``botocore``] Update autoscaling-plans client to latest version
* api-change:``xray``: [``botocore``] Update xray client to latest version
* api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version
* api-change:``ssm``: [``botocore``] Update ssm client to latest version
* api-change:``medialive``: [``botocore``] Update medialive client to latest version
* api-change:``redshift``: [``botocore``] Update redshift client to latest version
* api-change:``rds-data``: [``botocore``] Update rds-data client to latest version
* api-change:``appsync``: [``botocore``] Update appsync client to latest version
* api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version
* api-change:``quicksight``: [``botocore``] Update quicksight client to latest version
* api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version
   ```
   
  
  
   ### 1.9.48
   ```
   ======

* api-change:``lightsail``: [``botocore``] Update lightsail client to latest version
* api-change:``workspaces``: [``botocore``] Update workspaces client to latest version
* api-change:``workdocs``: [``botocore``] Update workdocs client to latest version
* api-change:``batch``: [``botocore``] Update batch client to latest version
* api-change:``ec2``: [``botocore``] Update ec2 client to latest version
* api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version
* api-change:``rds``: [``botocore``] Update rds client to latest version
* api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version
* api-change:``lambda``: [``botocore``] Update lambda client to latest version
* api-change:``config``: [``botocore``] Update config client to latest version
* api-change:``cloudtrail``: [``botocore``] Update cloudtrail client to latest version
* api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version
* api-change:``iot``: [``botocore``] Update iot client to latest version
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/boto3
  - Changelog: https://pyup.io/changelogs/boto3/
  - Repo: https://github.com/boto/boto3
</details>





### Update [pytest](https://pypi.org/project/pytest) from **4.0.0** to **4.0.1**.


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

Bug Fixes
---------

- `3952 &lt;https://github.com/pytest-dev/pytest/issues/3952&gt;`_: Display warnings before &quot;short test summary info&quot; again, but still later warnings in the end.


- `4386 &lt;https://github.com/pytest-dev/pytest/issues/4386&gt;`_: Handle uninitialized exceptioninfo in repr/str.


- `4393 &lt;https://github.com/pytest-dev/pytest/issues/4393&gt;`_: Do not create ``.gitignore``/``README.md`` files in existing cache directories.


- `4400 &lt;https://github.com/pytest-dev/pytest/issues/4400&gt;`_: Rearrange warning handling for the yield test errors so the opt-out in 4.0.x correctly works.


- `4405 &lt;https://github.com/pytest-dev/pytest/issues/4405&gt;`_: Fix collection of testpaths with ``--pyargs``.


- `4412 &lt;https://github.com/pytest-dev/pytest/issues/4412&gt;`_: Fix assertion rewriting involving ``Starred`` + side-effects.


- `4425 &lt;https://github.com/pytest-dev/pytest/issues/4425&gt;`_: Ensure we resolve the absolute path when the given ``--basetemp`` is a relative path.



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

- `4315 &lt;https://github.com/pytest-dev/pytest/issues/4315&gt;`_: Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check.


- `4440 &lt;https://github.com/pytest-dev/pytest/issues/4440&gt;`_: Adjust the stack level of some internal pytest warnings.
   ```
   
  
</details>


 

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





### Update [whitenoise](https://pypi.org/project/whitenoise) from **4.1.1** to **4.1.2**.


<details>
  <summary>Changelog</summary>
  
  
   ### 4.1.2
   ```
   ------

 * Add correct MIME type for WebAssembly, which is required for files to be
   executed (thanks `mdboom &lt;https://github.com/mdboom&gt;`_ ).
 * Stop accessing the FILE_CHARSET Django setting which was almost entirely
   unused and is now deprecated (thanks `timgraham
   &lt;https://github.com/timgraham&gt;`_).
   ```
   
  
</details>


 

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





### Update [backoff](https://pypi.org/project/backoff) from **1.6.0** to **1.7.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 1.7.0
   ```
   Changed

- Support Python 3.7
- Drop support for async in Python 3.4
- Drop support for Python 2.6
- Update development dependencies
- Use poetry for dependencies and packaging
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/backoff
  - Changelog: https://pyup.io/changelogs/backoff/
  - Repo: https://github.com/litl/backoff
</details>







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

bors bot added a commit to rehandalal/therapist that referenced this issue Nov 27, 2018

Merge #47
47: Update pytest to 4.0.1 r=rehandalal a=pyup-bot


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



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

Bug Fixes
---------

- `3952 &lt;https://github.com/pytest-dev/pytest/issues/3952&gt;`_: Display warnings before &quot;short test summary info&quot; again, but still later warnings in the end.


- `4386 &lt;https://github.com/pytest-dev/pytest/issues/4386&gt;`_: Handle uninitialized exceptioninfo in repr/str.


- `4393 &lt;https://github.com/pytest-dev/pytest/issues/4393&gt;`_: Do not create ``.gitignore``/``README.md`` files in existing cache directories.


- `4400 &lt;https://github.com/pytest-dev/pytest/issues/4400&gt;`_: Rearrange warning handling for the yield test errors so the opt-out in 4.0.x correctly works.


- `4405 &lt;https://github.com/pytest-dev/pytest/issues/4405&gt;`_: Fix collection of testpaths with ``--pyargs``.


- `4412 &lt;https://github.com/pytest-dev/pytest/issues/4412&gt;`_: Fix assertion rewriting involving ``Starred`` + side-effects.


- `4425 &lt;https://github.com/pytest-dev/pytest/issues/4425&gt;`_: Ensure we resolve the absolute path when the given ``--basetemp`` is a relative path.



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

- `4315 &lt;https://github.com/pytest-dev/pytest/issues/4315&gt;`_: Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check.


- `4440 &lt;https://github.com/pytest-dev/pytest/issues/4440&gt;`_: Adjust the stack level of some internal pytest warnings.
   ```
   
  
</details>


 

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



Co-authored-by: pyup-bot <github-bot@pyup.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment