Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/prov/tests/test_graphs.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
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)) |