1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
'''
crash with mesh w/o map
'''
from pymol import cmd, CmdException, testing, stored
@testing.requires_version('1.8.0.6') # 1.8.0.7
class TestPYMOL2757(testing.PyMOLTestCase):
def test(self):
cmd.viewport(100, 100)
# make map
cmd.fragment('gly', 'm1')
cmd.set('gaussian_b_floor', 30)
cmd.set('mesh_width', 5)
cmd.map_new('map')
cmd.delete('m1')
# make mesh
cmd.isomesh('mesh', 'map')
# check mesh presence by color
meshcolor = 'red'
cmd.color(meshcolor, 'mesh')
self.ambientOnly()
self.assertImageHasColor(meshcolor)
# continue without map
cmd.delete('map')
with testing.mktemp('.pse') as filename:
cmd.save(filename)
cmd.delete('*')
self.assertImageHasNotColor(meshcolor)
cmd.load(filename)
self.assertImageHasColor(meshcolor)
|