(cls)
| 13 | class BaseGraphML: |
| 14 | @classmethod |
| 15 | def setup_class(cls): |
| 16 | cls.simple_directed_data = """<?xml version="1.0" encoding="UTF-8"?> |
| 17 | <!-- This file was written by the JAVA GraphML Library.--> |
| 18 | <graphml xmlns="http://graphml.graphdrawing.org/xmlns" |
| 19 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 20 | xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns |
| 21 | http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> |
| 22 | <graph id="G" edgedefault="directed"> |
| 23 | <node id="n0"/> |
| 24 | <node id="n1"/> |
| 25 | <node id="n2"/> |
| 26 | <node id="n3"/> |
| 27 | <node id="n4"/> |
| 28 | <node id="n5"/> |
| 29 | <node id="n6"/> |
| 30 | <node id="n7"/> |
| 31 | <node id="n8"/> |
| 32 | <node id="n9"/> |
| 33 | <node id="n10"/> |
| 34 | <edge id="foo" source="n0" target="n2"/> |
| 35 | <edge source="n1" target="n2"/> |
| 36 | <edge source="n2" target="n3"/> |
| 37 | <edge source="n3" target="n5"/> |
| 38 | <edge source="n3" target="n4"/> |
| 39 | <edge source="n4" target="n6"/> |
| 40 | <edge source="n6" target="n5"/> |
| 41 | <edge source="n5" target="n7"/> |
| 42 | <edge source="n6" target="n8"/> |
| 43 | <edge source="n8" target="n7"/> |
| 44 | <edge source="n8" target="n9"/> |
| 45 | </graph> |
| 46 | </graphml>""" |
| 47 | cls.simple_directed_graph = eg.DiGraph() |
| 48 | cls.simple_directed_graph.add_node("n10") |
| 49 | cls.simple_directed_graph.add_edge("n0", "n2", id="foo") |
| 50 | cls.simple_directed_graph.add_edge("n0", "n2") |
| 51 | cls.simple_directed_graph.add_edges_from( |
| 52 | [ |
| 53 | ("n1", "n2"), |
| 54 | ("n2", "n3"), |
| 55 | ("n3", "n5"), |
| 56 | ("n3", "n4"), |
| 57 | ("n4", "n6"), |
| 58 | ("n6", "n5"), |
| 59 | ("n5", "n7"), |
| 60 | ("n6", "n8"), |
| 61 | ("n8", "n7"), |
| 62 | ("n8", "n9"), |
| 63 | ] |
| 64 | ) |
| 65 | cls.simple_directed_fh = io.BytesIO(cls.simple_directed_data.encode("UTF-8")) |
| 66 | |
| 67 | cls.attribute_data = """<?xml version="1.0" encoding="UTF-8"?> |
| 68 | <graphml xmlns="http://graphml.graphdrawing.org/xmlns" |
| 69 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 70 | xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns |
| 71 | http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> |
| 72 | <key id="d0" for="node" attr.name="color" attr.type="string"> |
no test coverage detected