Skip to content

Commit 815b762

Browse files
committed
Rename load-time-waste tests to from_mike, matching #687's renamed API
These two tests (originally 57e8611 on PR #685) called the removed Network.from_res1d, since #685 forked before #687 renamed it to from_mike/from_epanet. The rebase applied them without a merge conflict because the surrounding lines didn't overlap textually, but the calls were left broken. Rename the test functions too, matching the test_from_mike_* convention used elsewhere in this file.
1 parent 5ae223b commit 815b762

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tests/test_network.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -638,14 +638,14 @@ def test_from_mike_empty_nodes_and_reaches_keeps_topology_and_empty_outputs():
638638
@pytest.mark.skipif(
639639
sys.version_info >= (3, 14), reason="mikeio1d requires Python < 3.14"
640640
)
641-
def test_from_res1d_topology_only_locations_share_one_empty_frame():
641+
def test_from_mike_topology_only_locations_share_one_empty_frame():
642642
"""Topology-only locations must not each allocate their own empty frame.
643643
644644
That is two DataFrame allocations per reach, which profiling showed to be
645645
the single largest cost of a filtered load (gh #679).
646646
"""
647647
path_to_file = "./tests/testdata/network.res1d"
648-
network = Network.from_res1d(path_to_file, nodes=[], reaches=[])
648+
network = Network.from_mike(path_to_file, nodes=[], reaches=[])
649649
g = network.graph
650650

651651
frames = [g.nodes[n]["data"] for n in g.nodes]
@@ -656,7 +656,7 @@ def test_from_res1d_topology_only_locations_share_one_empty_frame():
656656
@pytest.mark.skipif(
657657
sys.version_info >= (3, 14), reason="mikeio1d requires Python < 3.14"
658658
)
659-
def test_from_res1d_reads_each_selected_node_once(monkeypatch):
659+
def test_from_mike_reads_each_selected_node_once(monkeypatch):
660660
"""A node shared by several reaches is read once, not once per reach.
661661
662662
_generate_graph keeps only the first copy of a node's data, so the repeat
@@ -676,7 +676,7 @@ def counting_simplify_colnames(location, *args, **kwargs):
676676
monkeypatch.setattr(_res1d, "_simplify_colnames", counting_simplify_colnames)
677677

678678
path_to_file = "./tests/testdata/network.res1d"
679-
network = Network.from_res1d(path_to_file, reaches=[])
679+
network = Network.from_mike(path_to_file, reaches=[])
680680

681681
n_unique_nodes = len(
682682
{reach.start.id for reach in network._reaches.values()}

0 commit comments

Comments
 (0)