Exemplo n.º 1
0
def test_4_by_5():
    active_links = sgrid.active_links((4, 5))
    assert_array_equal(
        active_links,
        np.array(
            [1, 2, 3, 6, 7, 8, 11, 12, 13, 19, 20, 21, 22, 23, 24, 25, 26]))
    assert len(active_links) == sgrid.active_link_count((4, 5))
Exemplo n.º 2
0
def test_4_by_5():
    active_links = sgrid.active_links((4, 5))
    assert_array_equal(
        active_links,
        np.array([1, 2, 3, 6, 7, 8, 11, 12, 13, 19, 20, 21, 22, 23, 24, 25, 26]),
    )
    assert len(active_links) == sgrid.active_link_count((4, 5))
Exemplo n.º 3
0
def test_with_link_nodes():
    link_nodes = sgrid.node_index_at_link_ends((4, 5))
    active_links = sgrid.active_links((4, 5), link_nodes=link_nodes)

    assert_array_equal(active_links,
                       np.array([1, 2, 3, 6, 7, 8, 11, 12, 13,
                                 19, 20, 21, 22, 23, 24, 25, 26]))
    assert_equal(len(active_links), sgrid.active_link_count((4, 5)))
Exemplo n.º 4
0
def test_with_link_nodes():
    link_nodes = sgrid.node_index_at_link_ends((4, 5))
    active_links = sgrid.active_links((4, 5), link_nodes=link_nodes)

    assert_array_equal(
        active_links,
        np.array(
            [1, 2, 3, 6, 7, 8, 11, 12, 13, 19, 20, 21, 22, 23, 24, 25, 26]))
    assert len(active_links) == sgrid.active_link_count((4, 5))
Exemplo n.º 5
0
 def test_4_by_5(self):
     active_links = sgrid.active_links((4, 5))
     self.assertArrayEqual(active_links,
                        np.array([1, 2, 3, 6, 7, 8, 11, 12, 13,
                                  19, 20, 21, 22, 23, 24, 25, 26]))
     self.assertEqual(len(active_links), sgrid.active_link_count((4, 5)))