def test_mark_done_invariant():
 seg = make_segment(1, explicit=True)
 with pytest.raises(exception.UserCritical):
  seg.mark_done()

def test_mark_done_invariant ( ) : seg = make_segment ( 1 , explicit = True ) with pytest . raises ( exception . UserCritical ) : seg . mark_done ( )
check explicit segments cannot be .