def test_color_on_copy(self): # The following test to make sure that a copy # was actually made of the line_color container(array). # If it isn't, both ls1 and ls2 will point at the same # data, and the change to the color affects both # line_states instead of just ls1. ls1 = self.create_ls() ls2 = ls1.copy() ls1.line_color[1] = 10 self.assert_(not basecore2d.line_state_equal(ls1, ls2))
def test_color_on_copy(self): # The following test to make sure that a copy # was actually made of the line_color container(array). # If it isn't, both ls1 and ls2 will point at the same # data, and the change to the color affects both # line_states instead of just ls1. ls1 = self.create_ls() ls2 = ls1.copy() ls1.line_color[1] = 10 self.assertTrue(not basecore2d.line_state_equal(ls1, ls2))
def test_cmp(self): ls1 = self.create_ls() ls2 = ls1.copy() self.assert_(basecore2d.line_state_equal(ls1, ls2))
def test_cmp_for_different_length_dash_patterns(self): ls1 = self.create_ls() ls2 = ls1.copy() ls1.line_dash = (ls1.line_dash[0], array([10, 10, 10, 10])) self.assert_(not basecore2d.line_state_equal(ls1, ls2))
def test_dash_on_copy(self): ls1 = self.create_ls() ls2 = ls1.copy() ls1.line_dash[1][0] = 10 self.assert_(not basecore2d.line_state_equal(ls1, ls2))
def test_cmp(self): ls1 = self.create_ls() ls2 = ls1.copy() self.assertTrue(basecore2d.line_state_equal(ls1, ls2))
def test_cmp_for_different_length_dash_patterns(self): ls1 = self.create_ls() ls2 = ls1.copy() ls1.line_dash = (ls1.line_dash[0], array([10, 10, 10, 10])) self.assertTrue(not basecore2d.line_state_equal(ls1, ls2))
def test_dash_on_copy(self): ls1 = self.create_ls() ls2 = ls1.copy() ls1.line_dash[1][0] = 10 self.assertTrue(not basecore2d.line_state_equal(ls1, ls2))