def test_calc_barycentres_no_adjacnets_2(self):
        G = helpers.cct_no_adjacents()
        G.update()

        expected_bcs = [ 0.0, 2.0, 1.0, 1.0, 1.0]
        bcs = G.calc_barycentres(1, 'upper')
        assert bcs == expected_bcs
    def test_calc_barycentres_no_adjacents_1(self):
        G = helpers.cct_no_adjacents()
        G.update()

        expected_bcs = [ 1.0, 1.25, 1.5 ]
        bcs = G.calc_barycentres(0, 'lower')
        assert bcs == expected_bcs
Exemple #3
0
    def test_calc_barycentres_no_adjacnets_2(self):
        G = helpers.cct_no_adjacents()
        G.update()

        expected_bcs = [0.0, 2.0, 1.0, 1.0, 1.0]
        bcs = G.calc_barycentres(1, 'upper')
        assert bcs == expected_bcs
Exemple #4
0
    def test_calc_barycentres_no_adjacents_1(self):
        G = helpers.cct_no_adjacents()
        G.update()

        expected_bcs = [1.0, 1.25, 1.5]
        bcs = G.calc_barycentres(0, 'lower')
        assert bcs == expected_bcs
 def test_calc_barycentres_no_adjacnets_3(self):
     G = helpers.cct_no_adjacents()
     G.update()
     G.vertices[1].reverse() # so -1 is 1st
     
     expected_bcs = [ 0.0, 0.0, 1.0, 2.0, 0.0]
     bcs = G.calc_barycentres(1, 'upper')
     assert bcs == expected_bcs
Exemple #6
0
    def test_calc_barycentres_no_adjacnets_3(self):
        G = helpers.cct_no_adjacents()
        G.update()
        G.vertices[1].reverse()  # so -1 is 1st

        expected_bcs = [0.0, 0.0, 1.0, 2.0, 0.0]
        bcs = G.calc_barycentres(1, 'upper')
        assert bcs == expected_bcs