Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/prov/tests/test_graphs.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 from __future__ import (absolute_import, division, print_function, | |
2 unicode_literals) | |
3 | |
4 import unittest | |
5 from prov.tests.examples import tests | |
6 from prov.graph import prov_to_graph, graph_to_prov | |
7 | |
8 | |
9 class ProvGraphTestCase(unittest.TestCase): | |
10 def test_simple_graph_conversion(self): | |
11 for name, doc_func in tests: | |
12 prov_org = doc_func() | |
13 g = prov_to_graph(prov_org) | |
14 if prov_org.has_bundles(): | |
15 # Cannot round-trip with documents containing bundles, skipping | |
16 continue | |
17 prov_doc = graph_to_prov(g) | |
18 self.assertEqual(prov_doc, prov_org, "Round trip graph conversion for '{}' failed.".format(name)) |