def get_active_tests(config): activeTests = config.pop("activeTests").strip().split(":") # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) return activeTests
def tests(config): counters = get_counters(config) global_overrides = get_global_overrides(config) activeTests = get_active_tests(config) test_dict = test.test_dict() tests = [] for test_name in activeTests: test_class = test_dict[test_name] tests.append(get_test(config, global_overrides, counters, test_class())) config["tests"] = tests
def get_active_tests(config): activeTests = config.pop('activeTests').strip().split(':') # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) return activeTests
def __call__(self, parser, namespace, values, option_string=None): from talos import test print('Available tests:') print('================\n') test_class_names = [(test_class.name(), test_class.description()) for test_class in test.test_dict().itervalues()] test_class_names.sort() for name, description in test_class_names: print(name) print('-' * len(name)) print(description) print # Appends a single blank line to the end parser.exit()
def get_active_tests(config): activeTests = config.pop("activeTests").strip().split(":") # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) # disabled DAMP on winXP: frequent hangs, <3% of devtools users on winXP if utils.PLATFORM_TYPE == "win_": activeTests = [i for i in activeTests if i != "damp"] return activeTests
def __call__(self, parser, namespace, values, option_string=None): print 'Available tests:' print '================\n' test_class_names = [ (test_class.name(), test_class.description()) for test_class in test.test_dict().itervalues() ] test_class_names.sort() for name, description in test_class_names: print name print '-'*len(name) print description print # Appends a single blank line to the end parser.exit()
def get_active_tests(config): activeTests = config.pop('activeTests').strip().split(':') # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) # disabled DAMP on winXP: frequent hangs, <3% of devtools users on winXP if utils.PLATFORM_TYPE == 'win_': activeTests = [i for i in activeTests if i != 'damp'] return activeTests
def __call__(self, parser, namespace, values, option_string=None): from talos import test print('Available tests:') print('================\n') test_class_names = [ (test_class.name(), test_class.description()) for test_class in test.test_dict().itervalues() ] test_class_names.sort() for name, description in test_class_names: print(name) print('-'*len(name)) print(description) print # Appends a single blank line to the end parser.exit()
def get_active_tests(config): activeTests = config.pop("activeTests").strip().split(":") # temporary hack for now until we have e10s running on all tests if config["e10s"] and not config["develop"]: for testname in ("sessionrestore", "sessionrestore_no_auto_restore"): if testname in activeTests: print "%s is unsupported on e10s, removing from list of " "tests to run" % testname activeTests.remove(testname) # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) return activeTests
def test_class_registered(self): _TESTS = test_dict() decorator = register_test() # class registered decorator(BasicTestB) assert "BasicTestB" in _TESTS assert BasicTestB in _TESTS.values() # cannot register same class with pytest.raises(AssertionError): decorator(BasicTestB) # # cannot register other class type with pytest.raises(AssertionError): decorator(NotATest)
def test_class_registered(self): _TESTS = test_dict() decorator = register_test() # class registered decorator(BasicTestB) assert 'BasicTestB' in _TESTS assert BasicTestB in _TESTS.values() # cannot register same class with pytest.raises(AssertionError): decorator(BasicTestB) # # cannot register other class type with pytest.raises(AssertionError): decorator(NotATest)
def get_active_tests(config): activeTests = config.pop('activeTests').strip().split(':') # on osx, ARES6 crashes about 50% of the time, bug 1437425 if mozinfo.os not in ['linux', 'win'] and \ 'ARES6' in activeTests and \ not config['develop']: activeTests.remove('ARES6') # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) return activeTests
def get_active_tests(config): activeTests = config.pop('activeTests').strip().split(':') # temporary hack for now until we have e10s running on all tests if config['e10s'] and not config['develop']: for testname in ('sessionrestore', 'sessionrestore_no_auto_restore'): if testname in activeTests: print "%s is unsupported on e10s, removing from list of " \ "tests to run" % testname activeTests.remove(testname) # ensure tests are available availableTests = test.test_dict() if not set(activeTests).issubset(availableTests): missing = [i for i in activeTests if i not in availableTests] raise ConfigurationError("No definition found for test(s): %s" % missing) return activeTests