u-boot-brain/test/py
Heinrich Schuchardt 89d52afa5d test: correct entry point to pytest
With Pytest 6.0.2 'make tests' fails:

sandbox: Traceback (most recent call last):
  File "./test/py/test.py", line 20, in <module>
    sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))
TypeError: console_main() takes 0 positional arguments but 1 was given

The definition of console_scripts has changed as follows:

Pytest 4.6.1:

[options.entry_points]
console_scripts =
        pytest=pytest:main
        py.test=pytest:main
        
Pytest 6.0.2:
        
[options.entry_points]
console_scripts =
    pytest=pytest:console_main
    py.test=pytest:console_main

The new function console_main() has a comment:
"This function is not meant for programmable use; use `main()`"

Hence let's call pytest.main() directly.
Move args processing into the __main__ paragraph.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Tom Rini <trini@konsulko.com>
2021-01-29 10:36:49 -05:00
..
tests test: test_ofplatdata: Mark as sandbox specific 2021-01-29 10:34:34 -05:00
.gitignore test/py: Implement pytest infrastructure 2016-01-20 19:06:23 -07:00
conftest.py pytest: Collect SPL unit tests 2020-10-29 14:42:18 -06:00
multiplexed_log.css SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
multiplexed_log.py test/py: Manual python3 fixes 2019-10-30 17:48:47 -04:00
pytest.ini test/py: Manual python3 fixes 2019-10-30 17:48:47 -04:00
requirements.txt test/py: Update docs, add requirements.txt for pip 2019-10-30 17:48:47 -04:00
test.py test: correct entry point to pytest 2021-01-29 10:36:49 -05:00
u_boot_console_base.py test/py: Add test support for three stage boot 2020-08-04 23:30:02 -04:00
u_boot_console_exec_attach.py SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u_boot_console_sandbox.py test/py: Add a way to pass flags to sandbox 2018-11-26 08:25:35 -05:00
u_boot_spawn.py test/py: Use raw strings more to avoid deprecation warnings 2019-10-30 17:48:47 -04:00
u_boot_utils.py test/py: Update u_boot_utils.find_ram_base to bypass the low 2MiB memory 2020-04-10 15:54:16 -04:00