Files

24 lines
499 B
Python
Raw Permalink Normal View History

2026-08-03 18:42:47 +08:00
'''
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