MCPcopy Create free account
hub / github.com/Pometry/Raphtory / test_networkx_exploded

Function test_networkx_exploded

python/tests/test_export.py:466–593  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464
465
466def test_networkx_exploded():
467 g = build_graph()
468
469 networkxGraph = g.to_networkx(explode_edges=True)
470 assert networkxGraph.number_of_nodes() == 5
471 assert networkxGraph.number_of_edges() == 9
472
473 edgeList = list(networkxGraph.edges(data=True))
474 resultList = [
475 (
476 "ServerA",
477 "ServerB",
478 {
479 "metadata": {
480 "datasource": "data/network_traffic_edges.csv",
481 "is_encrypted": True,
482 },
483 "temporal": [("data_size_MB", [((1693555200000, 0), 5.6)])],
484 "layer": "Critical System Request",
485 "update_history": (1693555200000, 0),
486 },
487 ),
488 (
489 "ServerA",
490 "ServerC",
491 {
492 "metadata": {
493 "is_encrypted": False,
494 "datasource": "data/network_traffic_edges.csv",
495 },
496 "temporal": [("data_size_MB", [((1693555500000, 1), 7.1)])],
497 "layer": "File Transfer",
498 "update_history": (1693555500000, 1),
499 },
500 ),
501 (
502 "ServerB",
503 "ServerD",
504 {
505 "metadata": {
506 "is_encrypted": True,
507 "datasource": "data/network_traffic_edges.csv",
508 },
509 "temporal": [("data_size_MB", [((1693555800000, 2), 3.2)])],
510 "layer": "Standard Service Request",
511 "update_history": (1693555800000, 2),
512 },
513 ),
514 (
515 "ServerC",
516 "ServerA",
517 {
518 "metadata": {
519 "is_encrypted": True,
520 "datasource": "data/network_traffic_edges.csv",
521 },
522 "temporal": [("data_size_MB", [((1693556400000, 4), 4.5)])],
523 "layer": "Critical System Request",

Callers

nothing calls this directly

Calls 5

listFunction · 0.85
compare_list_of_dictsFunction · 0.85
to_networkxMethod · 0.80
build_graphFunction · 0.70
edgesMethod · 0.45

Tested by

no test coverage detected