mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 03:29:40 -05:00
gnu: python-docrepr: Fix tests.
* gnu/packages/patches/python-docrepr-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/documentation.scm (python-docrepr)[source]<patches>: Use it here. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
c3f9445144
commit
53c47c4f28
3 changed files with 19 additions and 1 deletions
|
@ -1683,6 +1683,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
|
||||
%D%/packages/patches/pthreadpool-system-libraries.patch \
|
||||
%D%/packages/patches/python-chai-drop-python2.patch \
|
||||
%D%/packages/patches/python-docrepr-fix-tests.patch \
|
||||
%D%/packages/patches/python-feedparser-missing-import.patch \
|
||||
%D%/packages/patches/python-louvain-fix-test.patch \
|
||||
%D%/packages/patches/python-random2-getrandbits-test.patch \
|
||||
|
|
|
@ -296,7 +296,8 @@ (define-public python-docrepr
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1ma5gwy93m1djd3zdlnqfrwhgr8ic1qbsz5kkrb9f987ax40lfkd"))))
|
||||
"1ma5gwy93m1djd3zdlnqfrwhgr8ic1qbsz5kkrb9f987ax40lfkd"))
|
||||
(patches (search-patches "python-docrepr-fix-tests.patch"))))
|
||||
(build-system python-build-system)
|
||||
(arguments
|
||||
(list
|
||||
|
|
16
gnu/packages/patches/python-docrepr-fix-tests.patch
Normal file
16
gnu/packages/patches/python-docrepr-fix-tests.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
Fixes the errors with use of asyncio in docrepr/tests/test_output.py:
|
||||
|
||||
> await compare_screenshots(test_id, url)
|
||||
E TypeError: 'coroutine' object is not callable
|
||||
|
||||
--- a/conftest.py
|
||||
+++ b/conftest.py
|
||||
@@ -65,7 +65,7 @@ def _open_browser(url):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
-async def compare_screenshots(request):
|
||||
+def compare_screenshots(request):
|
||||
"""Run visual regression test on the output."""
|
||||
async def _compare_screenshots(test_id, url):
|
||||
if (request.config.getoption(COMPARE_SCREENSHOTS_OPTION) or
|
Loading…
Reference in a new issue