Skip to content

Instantly share code, notes, and snippets.

@elyezer
Last active August 29, 2015 13:57
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 elyezer/9832727 to your computer and use it in GitHub Desktop.
Save elyezer/9832727 to your computer and use it in GitHub Desktop.
Proposition of a way to create a kind of smoke test
# robottelo.some_module.py
from ddt import data as ddt_data
def data(func, *args):
if some_var:
return ddt_data(func, random.choice(args))
else:
return ddt_data(func, *args)
# test_something.py
# remove from ddt import data
# add the bellow
from robottelo.some_module import data
@omaciel
Copy link

omaciel commented Mar 28, 2014

Exactly what I was thing :)

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