def test_can_translate_atoms_with_iterable(self, mock_trim): atom = Atom("C", 20, 30, 50) atom.translate((5, -4, 12)) self.assertEqual(atom._x, 25) self.assertEqual(atom._y, 26) self.assertEqual(atom._z, 62) mock_trim.assert_called_with(12)
def test_can_translate_atoms_and_specify_trim(self, mock_trim): atom = Atom("C", 20, 30, 50) atom.translate(5, -4, 12, trim=18) mock_trim.assert_called_with(18) atom.translate((5, -4, 12), trim=None) mock_trim.assert_called_with(None)