def testcase_naming(): example = Tests() @example.test def simple(): pass @example.test def simple(): """Duplicate name, should have ``_2`` appended.""" class Test(TestBase): @test def simple(): """Another duplicate, should have ``_3`` appended.""" Test = example.register(Test) # Python 2.5 @example.test def test_something(): """Already prepended with ``test_`` - should be used verbatim.""" example.test(lambda self: None) TestCase = example.test_case() assert TestCase.test_simple assert TestCase.test_simple_2 assert TestCase.test_simple_3 assert TestCase.test_something assert TestCase.test_lambda
def testcase_naming(): example = Tests() @example.test def simple(): pass @example.test def simple(): """Duplicate name, should have ``_2`` appended.""" class Test(TestBase): @test def simple(): """Another duplicate, should have ``_3`` appended.""" Test = example.register(Test) # Python 2.5 @example.test def test_something(): """Already prepended with ``test_`` - should be used verbatim.""" example.test(lambda self: None) TestCase = example.test_case() assert TestCase.test_simple assert TestCase.test_simple_2 assert TestCase.test_simple_3 assert TestCase.test_something assert TestCase.test_lambda
def listfetch_unit(noweb=False): tests = Tests() tests.test(detect_jiken_url) tests.test(detect_en_jiken_url) tests.test(get_hanreiid) tests.test(get_en_hanreiid) tests.test(detect_all_jiken_urls) tests.test(detect_all_en_jiken_urls) if not noweb: tests.test(fetch_jiken_page) return tests
def common_unit(noweb=False): tests = Tests() tests.test(htmlreader) tests.test(make_full_uri) return tests
def jikenparser_unit(noweb=False): tests = Tests() tests.test(parse_single_attribute) tests.test(parse_single_attribute_from_en_table) tests.test(detect_all_hanrei_attrs) tests.test(detect_all_en_hanrei_attrs) tests.test(create_hanrei_struct) tests.test(create_en_hanrei_struct) tests.test(fetch_full_text) if not noweb: tests.test(full_text_from_web) tests.test(create_hanrei_elem) tests.test(create_hanrei_xml) tests.test(create_en_hanrei_xml) tests.test(en_attr_conversions) return tests