Files
pymol-open-source/testing/tests/undo/api/test_undo_computing.py
2023-04-15 15:47:44 -04:00

24 lines
499 B
Python

'''
Testing: pymol.importing
'''
import pytest
from pymol import cmd
def test_undo_clean():
cmd.fragment('his')
xyz1 = cmd.get_model('his').get_coord_list()
cmd.clean('his')
xyz2 = cmd.get_model('his').get_coord_list()
assert len(xyz1) == len(xyz2)
# coords have changed
assert xyz1 != xyz2
cmd.undo()
xyz2 = cmd.get_model('his').get_coord_list()
assert xyz1 == xyz2
cmd.redo()
xyz2 = cmd.get_model('his').get_coord_list()
assert xyz1 != xyz2