File: remove-yield-tests.patch

package info (click to toggle)
actdiag 3.0.0%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 288 kB
  • sloc: python: 1,281; makefile: 14
file content (35 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Description: Stop using yield tests

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/1114040
Forwarded: no
(upstream is abandoned)

--- actdiag-3.0.0+dfsg1.orig/src/actdiag/tests/test_generate_diagram.py
+++ actdiag-3.0.0+dfsg1/src/actdiag/tests/test_generate_diagram.py
@@ -16,16 +16,21 @@
 import os
 
 from blockdiag.tests.test_generate_diagram import (get_diagram_files,
-                                                   testcase_generator)
+                                              cases_getlist, generate)
+import pytest
 
 import actdiag.command
 
 
-def test_generate():
+def cases_getlist_actdiag():
     mainfunc = actdiag.command.main
     basepath = os.path.dirname(__file__)
     files = get_diagram_files(basepath)
     options = []
 
-    for testcase in testcase_generator(basepath, mainfunc, files, options):
-        yield testcase
+    return cases_getlist(basepath, mainfunc, files, options)
+
+
+@pytest.mark.parametrize("mainfunc, filetype, source, options",cases_getlist_actdiag())
+def test_generate(mainfunc, filetype, source, options):
+    generate(mainfunc, filetype, source, options)