~canonical-platform-qa/snappy-ecosystem-tests/fixing_ci

« back to all changes in this revision

Viewing changes to snappy_ecosystem_tests/run.py

  • Committer: Heber Parrucci
  • Date: 2017-02-13 16:00:04 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: heber.parrucci@canonical.com-20170213160004-oe9fnfkd6foqllae
Changing runner for pytest to aviod the plugins issues in nose2 using testtools.
Making pylint more strict: fail with Warnings messages.
Refactoring global variables to use Singletons instead.
Updating README.rst with the new runner options

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import re
24
24
import sys
25
 
import nose2
26
 
 
 
25
import pytest
27
26
 
28
27
FILTER_ARGUMENTS = '--proxy'
29
28
 
39
38
 
40
39
 
41
40
def _parse_arguments():
42
 
    """Parse and filter command line arguments to make them nose2 compatible"""
 
41
    """Parse and filter command line arguments to makethem pytest compatible"""
43
42
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
44
43
    _filter_arguments()
45
44
 
46
45
if __name__ == '__main__':
47
46
    _parse_arguments()
48
 
    sys.exit(nose2.discover())
 
47
    print('SYSTEM ARGUMENTS ARE: %s' % sys.argv)
 
48
    sys.exit(pytest.main(args=sys.argv + ['-p', 'no:cacheprovider']))