Skip to content

Instantly share code, notes, and snippets.

@nigelbabu
Created June 15, 2018 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nigelbabu/23bc80108c0f633b483b1a1d024ddd98 to your computer and use it in GitHub Desktop.
Save nigelbabu/23bc80108c0f633b483b1a1d024ddd98 to your computer and use it in GitHub Desktop.
Glusto skip
import pytest
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
@runs_on([['distributed-replicated', 'replicated', 'distributed',
'dispersed', 'distributed-dispersed'],
['glusterfs', 'cifs', 'nfs']])
class MySampleTest(GlusterBaseClass):
def my_test(self):
if g.config.get('test_env', 'upstream').lower() == 'upstream' and self.volume_type = 'cifs':
pytest.skip('SKIPPED. Bug #123456')
# do whatever
pass
@loadtheaccumulator
Copy link

It's been awhile since I tested, but if a decorator on the class method has access to the class attributes created by runs_on at this point, would using the skip decorator(s) be cleaner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment