Exemple #1
0
def gen_tests(data_dir):
    class TestFastTextPy(unittest.TestCase):
        pass

    for configuration in get_supervised_models(data_dir=data_dir):
        setattr(TestFastTextPy, "test_" + configuration["dataset"],
                gen_sup_test(configuration))
    return TestFastTextPy
Exemple #2
0
def gen_tests(data_dir):
    class TestFastTextPy(unittest.TestCase):
        pass

    for configuration in get_supervised_models(data_dir=data_dir):
        setattr(
            TestFastTextPy, "test_" + configuration["dataset"],
            gen_sup_test(configuration)
        )
    return TestFastTextPy
Exemple #3
0
def gen_tests(data_dir, verbose=1):
    class TestFastTextPy(unittest.TestCase):
        pass

    i = 0
    for configuration in get_supervised_models(verbose=verbose):
        setattr(TestFastTextPy,
                "test_sup_" + str(i) + "_" + configuration["dataset"],
                gen_sup_test(configuration, data_dir))
        i += 1
    return TestFastTextPy
Exemple #4
0
def gen_tests(data_dir, verbose=1):
    class TestFastTextPy(unittest.TestCase):
        pass

    i = 0
    for configuration in get_supervised_models(verbose=verbose):
        setattr(
            TestFastTextPy,
            "test_sup_" + str(i) + "_" + configuration["dataset"],
            gen_sup_test(configuration, data_dir)
        )
        i += 1
    return TestFastTextPy