def test_doc(self): suite = TestSuite() for filename in os.listdir('../'): if filename.endswith(".py"): suite.addTest(doctest.DocFileSuite('../' + filename)) runner = TextTestRunner(verbosity=2) runner.run(suite)
def suite(): """Returns the test suite for this module.""" result = TestSuite() loader = defaultTestLoader result.addTest(loader.loadTestsFromModule(test_api)) return result
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(ModelTestCase)) suite.addTest(loader.loadTestsFromTestCase(FSAModelTest)) suite.addTest(loader.loadTestsFromTestCase(FunctionAPITestCase)) suite.addTest(loader.loadTestsFromTestCase(FunctionEvaluationTest)) suite.addTest(loader.loadTestsFromTestCase(APITestCase)) return suite
def test_suite(): suite = TestSuite() OPTIONFLAGS = (doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE) for testfile in ('testBrowserLayers.txt', 'testCustomizeView.txt'): suite.addTest(FunctionalDocFileSuite(testfile, optionflags=OPTIONFLAGS, package="plone.app.customerize.tests", test_class=CustomerizeFunctionalTestCase), ) return suite
def suite(): """Returns the test suite for this module.""" result = TestSuite() loader = defaultTestLoader result.addTest(loader.loadTestsFromModule(test_helpers)) result.addTest(loader.loadTestsFromModule(test_manager)) result.addTest(loader.loadTestsFromModule(test_search)) result.addTest(loader.loadTestsFromModule(test_validation)) result.addTest(loader.loadTestsFromModule(test_views)) result.addTest(loader.loadTestsFromModule(test_processors)) return result
def load_tests(loader, standard_tests, pattern): """Loads the tests from this module""" suite = TestSuite() # Only enable if you have a local server running. # TODO: Consider automatic skipping if zmq fails to connect # suite.addTest(loader.loadTestsFromTestCase(LiveGuessApiTestCase)) suite.addTest(loader.loadTestsFromTestCase(ClientTestCase)) suite.addTest(loader.loadTestsFromTestCase(CORSTestCase)) return suite
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(ModelTestCase)) suite.addTest(loader.loadTestsFromTestCase(FunctionAPITestCase)) suite.addTest(loader.loadTestsFromTestCase(FunctionEvaluationTest)) suite.addTest(loader.loadTestsFromTestCase(APITestCase)) return suite
def get_suite(test_names, test_dir, file_match, browser_type, browser_version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, found, failfast, debug, extended=False): suite = TestSuite() dir_list = os.listdir(test_dir) # filter directory entries that don't match the file match pattern dir_list = [f for f in dir_list if fnmatch.fnmatch(f, file_match)] for entry in dir_list: if not entry.endswith('.py'): continue if test_names and entry[:-3] not in test_names: continue elif not test_names: if entry.startswith('_'): # ignore entries starting with underscore unless specified continue found.add(entry[:-3]) csv_path = os.path.join(test_dir, entry.replace('.py', '.csv')) if os.path.isfile(csv_path): # reading the csv file now for row in get_data(csv_path): # row is a dictionary of variables suite.addTest( get_case( test_dir, entry, browser_type, browser_version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, row, failfast=failfast, debug=debug, extended=extended ) ) else: suite.addTest( get_case( test_dir, entry, browser_type, browser_version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, failfast=failfast, debug=debug, extended=extended ) ) return suite
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(OperatorsTest)) suite.addTest(loader.loadTestsFromTestCase(QueryCreationTest)) suite.addTest(loader.loadTestsFromTestCase(SearchTest)) return suite
def suite(): suite = TestSuite() suite.addTest(defaultTestLoader.loadTestsFromTestCase(TestParseLine)) suite.addTest(defaultTestLoader.loadTestsFromTestCase(TestFuzzyMatch)) if is_win: suite.addTest(defaultTestLoader.loadTestsFromTestCase(TestAppIdentification)) return suite
def get_suite(test_names, test_dir, collect_only, browser_type, device, version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, failfast, debug, custom_options=None, extended=False, saucelabs_enabled=False, browserstack_enabled=False, vagrant_enabled=False, skip_tracking=False): suite = TestSuite() for case in find_cases(test_names, test_dir): csv_path = os.path.join(test_dir, case.replace('.py', '.csv')) if os.path.isfile(csv_path): # reading the csv file now for row in get_data(csv_path): # row is a dictionary of variables suite.addTest( get_case( test_dir, case, browser_type, device, version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, row, saucelabs_enabled=saucelabs_enabled, browserstack_enabled=browserstack_enabled, vagrant_enabled=vagrant_enabled, custom_options=custom_options, failfast=failfast, debug=debug, extended=extended, skip_tracking=skip_tracking ) ) else: suite.addTest( get_case( test_dir, case, browser_type, device, version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, custom_options=custom_options, failfast=failfast, browserstack_enabled=browserstack_enabled, vagrant_enabled=vagrant_enabled, debug=debug, extended=extended, saucelabs_enabled=saucelabs_enabled, skip_tracking=skip_tracking ) ) return suite
def get_suite(test_names, test_dir, count_only, browser_type, browser_version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, failfast, debug, extended=False): suite = TestSuite() if allscrewedup: print "ENTERING get_suite \n" print inspect.getargspec(get_suite) print [locals()[arg] for arg in inspect.getargspec(get_suite).args] for case in find_cases(test_names, test_dir): csv_path = os.path.join(test_dir, case.replace('.py', '.csv')) if os.path.isfile(csv_path): # reading the csv file now for row in get_data(csv_path): # row is a dictionary of variables suite.addTest( get_case( test_dir, case, browser_type, browser_version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, row, failfast=failfast, debug=debug, extended=extended ) ) else: suite.addTest( get_case( test_dir, case, browser_type, browser_version, browser_platform, session_name, javascript_disabled, webdriver_remote_url, screenshots_on, failfast=failfast, debug=debug, extended=extended ) ) return suite
def suite(): suite = TestSuite() for test in make_json_suite(): for p in test['pass']: datum = json.loads(json.dumps(p.datum)) suite.addTest(make_pass(test['schema'], datum)) suite.addTest(make_reserialize(test['schema'], datum)) for f in test['fail']: datum = json.loads(json.dumps(f.datum)) suite.addTest(make_fail(test['schema'], datum)) return suite
def test_suite(): from unittest2 import TestSuite, makeSuite suite = TestSuite() suite.addTest(makeSuite(DepartmentTests)) return suite
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(HelpersTest)) suite.addTest(loader.loadTestsFromTestCase(ModelHelpersTest)) return suite
def test_suite(): from unittest2 import TestSuite, makeSuite suite = TestSuite() suite.addTest(makeSuite(PreconditionTests)) suite.addTest(makeSuite(PreconditionRegistryTests)) return suite
def test_suite(): from unittest2 import TestSuite, makeSuite suite = TestSuite() suite.addTest(makeSuite(BasicTests)) return suite
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(ProcessorsTest)) return suite
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(SimpleValidationTest)) suite.addTest(loader.loadTestsFromTestCase(SAVTest)) return suite
def test_suite(): from unittest2 import TestSuite, makeSuite suite = TestSuite() suite.addTest(makeSuite(InstitutionTests)) suite.addTest(makeSuite(InstitutionPortletTests)) return suite
def test_suite(): from unittest2 import TestSuite, makeSuite suite = TestSuite() suite.addTest(makeSuite(NumberMixinTests)) return suite
def load_tests(loader, standard_tests, pattern): """Returns the test suite for this module.""" suite = TestSuite() suite.addTest(loader.loadTestsFromTestCase(APIManagerTest)) suite.addTest(loader.loadTestsFromTestCase(FSATest)) return suite