File: remove_yield_tests.patch

package info (click to toggle)
seqdiag 3.0.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 412 kB
  • sloc: python: 1,906; makefile: 14
file content (35 lines) | stat: -rw-r--r-- 1,158 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/1114371
Forwarded: no
(upstream is abandoned)

--- seqdiag-3.0.0+dfsg.orig/src/seqdiag/tests/test_generate_diagram.py
+++ seqdiag-3.0.0+dfsg/src/seqdiag/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 seqdiag.command
 
 
-def test_generate():
+def cases_getlist_seqdiag():
     mainfunc = seqdiag.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_seqdiag())
+def test_generate(mainfunc, filetype, source, options):
+    generate(mainfunc, filetype, source, options)