Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 647924 - dev-util/vint-0.3.18 : [TEST] _ ERROR collecting setup.py _
Summary: dev-util/vint-0.3.18 : [TEST] _ ERROR collecting setup.py _
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Coacher
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2018-02-17 08:26 UTC by Toralf Förster
Modified: 2018-02-23 19:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.80 KB, text/plain)
2018-02-17 08:26 UTC, Toralf Förster
Details
dev-util:vint-0.3.18:20180217-063231.log (dev-util:vint-0.3.18:20180217-063231.log,36.06 KB, text/plain)
2018-02-17 08:26 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,249.05 KB, text/plain)
2018-02-17 08:26 UTC, Toralf Förster
Details
environment (environment,108.60 KB, text/plain)
2018-02-17 08:26 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,17.02 KB, application/x-bzip)
2018-02-17 08:26 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,28.00 KB, application/x-bzip)
2018-02-17 08:26 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-02-17 08:26:29 UTC
==================================== ERRORS ====================================
__________________________ ERROR collecting setup.py ___________________________
setup.py:74: in <module>
    'vint = vint:main',
/usr/lib64/python2.7/site-packages/setuptools/__init__.py:129: in setup

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-desktop-plasma_libressl-test_20180209-211052

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python2.7 (fallback)
  [3]   pypy (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.6.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv dev-util/vint
[ebuild  N    ] dev-util/vint-0.3.18  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6"
Comment 1 Toralf Förster gentoo-dev 2018-02-17 08:26:33 UTC
Created attachment 519874 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-02-17 08:26:36 UTC
Created attachment 519876 [details]
dev-util:vint-0.3.18:20180217-063231.log
Comment 3 Toralf Förster gentoo-dev 2018-02-17 08:26:39 UTC
Created attachment 519878 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-02-17 08:26:42 UTC
Created attachment 519880 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-02-17 08:26:45 UTC
Created attachment 519882 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-02-17 08:26:48 UTC
Created attachment 519884 [details]
temp.tbz2
Comment 7 Coacher 2018-02-19 14:18:37 UTC
`emerge -pqv` output says USE=test isn't enabled, but build.log suggests otherwise. Please clarify what's going on here.
Comment 8 Toralf Förster gentoo-dev 2018-02-19 18:39:46 UTC
It failed with FEATURES=test.

The attached "emerge -qpv" wrongly shows the state after the error handling where the tinderbox automatically added the package to "notest" :

# grep -Hir vint /etc/portage/package.*/*
/etc/portage/package.env/notest:=dev-util/vint-0.3.18 notest

I will fix the script - thx !
Comment 9 Coacher 2018-02-23 18:36:14 UTC
Excerpts from build.log:
```
platform linux2 -- Python 2.7.14, pytest-3.2.2, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python2.7
...
plugins: xdist-1.20.1, relaxed-1.1.0, metadata-1.3.0, html-1.16.0, forked-0.2, cov-2.5.1, capturelog-0.7, arraydiff-0.1, backports.unittest-mock-1.3
collecting ... collected 334 items / 1 errors

...
vint/ast/node_type.py::NodeType
  cannot collect test class 'NodeType' because it has a __new__ constructor

vint/ast/parsing.py::Parser
  cannot collect test class 'Parser' because it has a __init__ constructor

vint/ast/traversing.py::UnknownNodeTypeException
  cannot collect test class 'UnknownNodeTypeException' because it has a __init__ constructor
```

There are only ~270 tests in vint. Your pytest picks up regular source code as tests. This is caused by dev-python/pytest-relaxed being installed.
Quote from pytest-relaxed homepage:
```
Tell pytest where your tests live via the testpaths option; otherwise pytest-relaxed will cause pytest to load all of your non-test code as tests!
```

Please don't use this crappy plugin, which unnecessarily breaks stuff.
Thanks for the report though :)
Comment 10 Toralf Förster gentoo-dev 2018-02-23 18:53:04 UTC
so, should vint block pytest-relaxed or set -test or is pytest-relaxed broken?
Comment 11 Coacher 2018-02-23 19:02:40 UTC
Neither. pytest-relaxed changes pytest behaviour in an incompatible way and picks up as tests every python module unless specifically told otherwise. This is intended behaviour, but EVERY python project must be adjusted for it.

Throw pytest-relaxed away (at least for mass testing).