def test_compare_bonds_equal(self): # given particles = [uuid.uuid4(), uuid.uuid4()], bond = Bond(uid=None, particles=particles, data=create_data_container()) reference = Bond(uid=None, particles=particles, data=create_data_container()) # this should pass without problems compare_bonds(bond, reference, testcase=self)
def test_compare_bonds_equal(self): # given particles = [uuid.uuid4(), uuid.uuid4()], bond = Bond( uid=None, particles=particles, data=create_data_container()) reference = Bond( uid=None, particles=particles, data=create_data_container()) # this should pass without problems compare_bonds(bond, reference, testcase=self)
def test_compare_bonds_not_equal(self): # given particles = [uuid.uuid4(), uuid.uuid4()], bond = Bond( uid=uuid.uuid4(), particles=particles, data=create_data_container()) reference = Bond( uid=uuid.uuid4(), particles=particles, data=create_data_container()) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self) # given bond = Bond( uid=reference.uid, particles=particles[-1], data=create_data_container()) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self) # given bond = Bond( uid=uuid.uuid4(), particles=particles, data=DataContainer()) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self) # given bond = Bond([None]) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self)
def test_compare_bonds_not_equal(self): # given particles = [uuid.uuid4(), uuid.uuid4()], bond = Bond(uid=uuid.uuid4(), particles=particles, data=create_data_container()) reference = Bond(uid=uuid.uuid4(), particles=particles, data=create_data_container()) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self) # given bond = Bond(uid=reference.uid, particles=particles[-1], data=create_data_container()) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self) # given bond = Bond(uid=uuid.uuid4(), particles=particles, data=DataContainer()) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self) # given bond = Bond([None]) # when/then with self.assertRaises(AssertionError): compare_bonds(bond, reference, testcase=self)