Skip to content
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-flake8: checkPhase failure #39206

Closed
ckauhaus opened this issue Apr 20, 2018 · 4 comments · Fixed by #39815
Closed

pytest-flake8: checkPhase failure #39206

ckauhaus opened this issue Apr 20, 2018 · 4 comments · Fixed by #39815
Labels
0.kind: regression Something that worked before working no longer 2.status: wait-for-upstream Waiting for upstream fix (or their other action). 6.topic: python

Comments

@ckauhaus
Copy link
Contributor

Issue description

python36Packages.pytest-flake8 fails to build as of e821f40 on both Linux and Darwin: failed assertion

Steps to reproduce

$ nix-build -A pkgs.python36Packages.pytest-flake8

============================= test session starts ==============================
platform linux -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /build/pytest-flake8-1.0.0, inifile: tox.ini
plugins: flake8-1.0.0
collected 15 items

pytest_flake8.py .                                                       [  6%]
setup.py .                                                               [ 13%]
test_flake8.py ...........xF                                             [100%]

=================================== FAILURES ===================================
_____________________________ test_junit_classname _____________________________

testdir = <Testdir local('/build/pytest-of-nixbld/pytest-0/test_junit_classname0')>

    def test_junit_classname(testdir):
        testdir.makepyfile("")
        result = testdir.runpytest("--flake8", "--junit-xml=TEST.xml")
        junit = testdir.tmpdir.join("TEST.xml")
        with open(str(junit)) as j_file:
            j_text = j_file.read()
        assert result.ret == 0
>       assert 'classname=""' not in j_text
E       assert 'classname=""' not in '<?xml version="1.0" encoding="utf-8"?><testsuite errors="0" failures="0" name="pytest" skips="0" tests="1" time="0.12...ile="test_junit_classname.py" line="-1" name="test_junit_classname" time="0.11568927764892578"></testcase></testsuite>'

/build/pytest-flake8-1.0.0/test_flake8.py:188: AssertionError
----------------------------- Captured stdout call -----------------------------
============================= test session starts ==============================
platform linux -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /build/pytest-of-nixbld/pytest-0/test_junit_classname0, inifile:
plugins: flake8-1.0.0
collected 1 item

test_junit_classname.py .                                                [100%]

 generated xml file: /build/pytest-of-nixbld/pytest-0/test_junit_classname0/TEST.xml
=========================== 1 passed in 0.12 seconds ===========================
================ 1 failed, 13 passed, 1 xfailed in 2.36 seconds ================
builder for '/nix/store/nkffrk37xmg7lnnzvgz9jp9rlf8ax1fa-python3.6-pytest-flake8-1.0.0.drv' failed with exit code 1

Same of python35Packages.pytest-flake8 on both Linux and Darwin.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.4.0-42-generic, Ubuntu, 16.04.4 LTS (Xenial Xerus)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.0
  • channels(ck): "nixpkgs-18.03.132013.41b1c57d8dd"
  • channels(root): "nixpkgs-17.09.2029.ab36c74390"
  • nixpkgs: /home/local/ck/code/nixpkgs
@ckauhaus
Copy link
Contributor Author

@jluttine

@dotlambda
Copy link
Member

That's a known upstream issue: tholo/pytest-flake8#45

@dotlambda dotlambda added 6.topic: python 2.status: wait-for-upstream Waiting for upstream fix (or their other action). labels Apr 20, 2018
@ckauhaus
Copy link
Contributor Author

ic - would be probably better to patch the offending test out instead of letting the whole package build fail

@ckauhaus ckauhaus mentioned this issue Apr 20, 2018
8 tasks
ckauhaus pushed a commit to ckauhaus/nixpkgs that referenced this issue Apr 20, 2018
Update to current vulnix which features greatly improved whitelist
handling among others.

- Temporarly disable flake8 until NixOS#39206 is solved.
- Split docs into own output.
@FRidh FRidh added the 0.kind: regression Something that worked before working no longer label Apr 20, 2018
@jluttine
Copy link
Member

jluttine commented May 1, 2018

This is now fixed upstream in version 1.0.1. I made a pull request for the upgrade: #39815

dotlambda pushed a commit that referenced this issue May 2, 2018
Synthetica9 pushed a commit to Synthetica9/nixpkgs that referenced this issue May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer 2.status: wait-for-upstream Waiting for upstream fix (or their other action). 6.topic: python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants