def test_selection(): Mol = Molecule() Mol.newAtom('C', (0, 0, 0)) Mol.addSelection([1, (0, 0, 0)]) Mol.addSelection([1, (1, 0, 0)]) assert Mol.getSelection() == [[1, (0, 0, 0)], [1, (1, 0, 0)]] Mol.addSelection([1, (1, 0, 0)]) assert Mol.getSelection() == [[1, (0, 0, 0)]] Mol.delSelection() assert Mol.getSelection() == []