def skip_openpyxl_gt21(cls):
 @classmethod
 def setUpClass(cls):
  _skip_if_no_openpyxl()
  import openpyxl
  ver = openpyxl.__version__
  if (not ((LooseVersion(ver) >= LooseVersion('2.0.0')) and (LooseVersion(ver) < LooseVersion('2.2.0')))):
   raise nose.SkipTest(('openpyxl %s >= 2.2' % str(ver)))
 cls.setUpClass = setUpClass
 return cls

def skip_openpyxl_gt21 ( cls ) : @ classmethod def setUpClass ( cls ) : _skip_if_no_openpyxl ( ) import openpyxl ver = openpyxl . __version__ if ( not ( ( LooseVersion ( ver ) >= LooseVersion ( '2.0.0' ) ) and ( LooseVersion ( ver ) < LooseVersion ( '2.2.0' ) ) ) ) : raise nose . SkipTest ( ( 'openpyxl %s >= 2.2' % str ( ver ) ) ) cls . setUpClass = setUpClass return cls
skip a testcase instance if openpyxl >= 2 .