Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/prov/tests/test_dot.py @ 1:56ad4e20f292 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:32:28 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:d30785e31577 | 1:56ad4e20f292 |
---|---|
1 """ | |
2 Created on Aug 13, 2015 | |
3 | |
4 @author: Trung Dong Huynh | |
5 """ | |
6 from __future__ import (absolute_import, division, print_function, | |
7 unicode_literals) | |
8 | |
9 import unittest | |
10 | |
11 # Skipping SVG tests if pydot is not installed | |
12 from pkgutil import find_loader | |
13 if find_loader("pydot") is not None: | |
14 | |
15 from prov.dot import prov_to_dot | |
16 from prov.tests.test_model import AllTestsBase | |
17 from prov.tests.utility import DocumentBaseTestCase | |
18 | |
19 | |
20 class SVGDotOutputTest(DocumentBaseTestCase, AllTestsBase): | |
21 """ | |
22 One-way output SVG with prov.dot to exercise its code | |
23 """ | |
24 MIN_SVG_SIZE = 850 | |
25 | |
26 def do_tests(self, prov_doc, msg=None): | |
27 dot = prov_to_dot(prov_doc) | |
28 svg_content = dot.create(format="svg") | |
29 # Very naive check of the returned SVG content as we have no way to check the graphical content | |
30 self.assertGreater( | |
31 len(svg_content), self.MIN_SVG_SIZE, | |
32 "The size of the generated SVG content should be greater than %d bytes" % self.MIN_SVG_SIZE | |
33 ) | |
34 | |
35 | |
36 if __name__ == '__main__': | |
37 unittest.main() |