samuelcolvin / python-devtools

Dev tools for python
https://python-devtools.helpmanual.io/
MIT License
985 stars 47 forks source link

A failure occurred in check() #75

Closed SathvikJoel closed 3 years ago

SathvikJoel commented 3 years ago

Python has been updated to 3.9.0 . I think this error is because of that, but I am not sure OS : Arch Linux I downloaded the AUR package and called the makepkg -si and this is what I get

==> Making package: python-devtools 0.6.1-1 (Sunday 06 December 2020 02:18:39 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found python-devtools-0.6.1.tar.gz
  -> Found LICENSE
==> Validating source files with sha256sums...
    python-devtools-0.6.1.tar.gz ... Passed
    LICENSE ... Passed
==> Validating source files with b2sums...
    python-devtools-0.6.1.tar.gz ... Passed
    LICENSE ... Passed
==> Extracting sources...
  -> Extracting python-devtools-0.6.1.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
running build
running build_py
==> Starting check()...
running pytest
running egg_info
writing devtools.egg-info/PKG-INFO
writing dependency_links to devtools.egg-info/dependency_links.txt
writing requirements to devtools.egg-info/requires.txt
writing top-level names to devtools.egg-info/top_level.txt
reading manifest file 'devtools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'devtools.egg-info/SOURCES.txt'
running build_ext
============================================================== test session starts ==============================================================
platform linux -- Python 3.9.0, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
rootdir: /home/joel/build/python-devtools/src/python-devtools-0.6.1, configfile: setup.cfg, testpaths: tests
plugins: mock-2.0.0
collected 96 items                                                                                                                              

tests/test_ansi.py ............                                                                                                           [ 12%]
tests/test_custom_pretty.py .....s                                                                                                        [ 18%]
tests/test_expr_render.py ................                                                                                                [ 35%]
tests/test_main.py ....................s.                                                                                                 [ 58%]
tests/test_prettier.py ..F...............s.ss.....s.                                                                                      [ 88%]
tests/test_timer.py ......                                                                                                                [ 94%]
tests/test_utils.py ....s                                                                                                                 [100%]

=================================================================== FAILURES ====================================================================
_________________________________________________________________ test_colours __________________________________________________________________

    def test_colours():
        v = pformat({1: 2, 3: 4}, highlight=True)
>       assert v.startswith('\x1b'), repr(v)
E       AssertionError: '{\n    1: 2,\n    3: 4,\n}'
E       assert False
E        +  where False = <built-in method startswith of str object at 0x7fbabf33ba80>('\x1b')
E        +    where <built-in method startswith of str object at 0x7fbabf33ba80> = '{\n    1: 2,\n    3: 4,\n}'.startswith

tests/test_prettier.py:52: AssertionError
============================================================ short test summary info ============================================================
FAILED tests/test_prettier.py::test_colours - AssertionError: '{\n    1: 2,\n    3: 4,\n}'
==================================================== 1 failed, 88 passed, 7 skipped in 0.31s ====================================================
==> ERROR: A failure occurred in check().
    Aborting...
alexmojaki commented 3 years ago

Seems to work fine now.