MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / test_unicode_node

Method test_unicode_node

easygraph/readwrite/tests/test_gml.py:236–251  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

234 assert data == answer
235
236 def test_unicode_node(self):
237 node = "node" + chr(169)
238 G = eg.Graph()
239 G.add_node(node)
240 fobj = tempfile.NamedTemporaryFile()
241 eg.write_gml(G, fobj)
242 fobj.seek(0)
243 # Should be bytes in 2.x and 3.x
244 data = fobj.read().strip().decode("ascii")
245 answer = """graph [
246 node [
247 id 0
248 label "node©"
249 ]
250]"""
251 assert data == answer
252
253 def test_float_label(self):
254 node = 1.0

Callers

nothing calls this directly

Calls 2

add_nodeMethod · 0.95
GraphMethod · 0.80

Tested by

no test coverage detected