Skip to content

0.5.0: pytest is failing #6

@kloczek

Description

@kloczek

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-doit-py-0.5.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-doit-py-0.5.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0
collected 25 items

tests/test_coverage.py ..........                                                                                                                                    [ 40%]
tests/test_docs.py F....                                                                                                                                             [ 60%]
tests/test_package.py .....                                                                                                                                          [ 80%]
tests/test_pyflakes.py .....                                                                                                                                         [100%]

================================================================================= FAILURES =================================================================================
_________________________________________________________________________ TestSpell.test_check_ok __________________________________________________________________________

self = <test_docs.TestSpell object at 0x7f9e10babc70>

    def test_check_ok(self):
>       assert docs.check_no_output(str(SAMPLE_PATH / 'flake_fail.py'),
                                    str(SAMPLE_PATH / 'dict.txt'))
E       AssertionError: assert False
E        +  where False = <function check_no_output at 0x7f9e10c60ee0>('/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/tests/sample/flake_fail.py', '/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/tests/sample/dict.txt')
E        +    where <function check_no_output at 0x7f9e10c60ee0> = docs.check_no_output
E        +    and   '/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/tests/sample/flake_fail.py' = str((PosixPath('/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/tests/sample') / 'flake_fail.py'))
E        +    and   '/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/tests/sample/dict.txt' = str((PosixPath('/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/tests/sample') / 'dict.txt'))

tests/test_docs.py:11: AssertionError
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
a
comment
without
a
typo
def
do
nothing
number

========================================================================= short test summary info ==========================================================================
FAILED tests/test_docs.py::TestSpell::test_check_ok - AssertionError: assert False
======================================================================= 1 failed, 24 passed in 0.24s =======================================================================

List of modules isnatlled in build env

Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
attrs                         22.1.0
Babel                         2.10.2
build                         0.8.0
charset-normalizer            2.1.0
cloudpickle                   2.1.0
codespell                     2.1.0
configclass                   0.2.0
distro                        1.7.0
docutils                      0.18.1
doit                          0.36.0
extras                        1.0.0
fixtures                      4.0.0
gpg                           1.17.1-unknown
idna                          3.3
imagesize                     1.4.1
importlib-metadata            4.12.0
iniconfig                     1.1.1
Jinja2                        3.1.1
libcomps                      0.1.18
MarkupSafe                    2.1.1
mergedict                     1.0.0
packaging                     21.3
pbr                           5.9.0
pep517                        0.12.0
pip                           22.2.1
pluggy                        1.0.0
py                            1.11.0
pyflakes                      2.4.0
Pygments                      2.12.0
PyGObject                     3.42.2
pyparsing                     3.0.9
pytest                        7.1.2
python-dateutil               2.8.2
pytz                          2022.1
requests                      2.28.1
rpm                           4.17.0
setuptools                    63.4.2
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        5.1.1
sphinxcontrib-applehelp       1.0.2.dev20220730
sphinxcontrib-devhelp         1.0.2.dev20220730
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1.dev20220730
sphinxcontrib-qthelp          1.0.3.dev20220730
sphinxcontrib-serializinghtml 1.1.5
testtools                     2.5.0
tomli                         2.0.1
urllib3                       1.26.9
wheel                         0.37.1
zipp                          3.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions