Example #1
0
def load_tests(loader, tests, ignore):
    # TODO: this must be somewhere when doctest is called, not here
    # TODO: ultimate solution is not to use _ as a buildin in lib/python
    # for now it is the only place where it works
    grass.gunittest.utils.do_doctest_gettext_workaround()
    # this should be called at some top level

    from grass.pygrass import utils
    from grass.pygrass.modules import Module
    Module("g.region", n=40, s=0, e=40, w=0, res=10)
    Module("r.mapcalc", expression="%s = row() + (10 * col())"%(pygrpc.test_raster_name),
                             overwrite=True)
    utils.create_test_vector_map(pygrpc.test_vector_name)
    

    tests.addTests(doctest.DocTestSuite(pygrpc))
    tests.addTests(doctest.DocTestSuite(pygrpc.base))
    return tests
def load_tests(loader, tests, ignore):
    # TODO: this must be somewhere when doctest is called, not here
    # TODO: ultimate solution is not to use _ as a buildin in lib/python
    # for now it is the only place where it works
    grass.gunittest.utils.do_doctest_gettext_workaround()
    # this should be called at some top level

    from grass.pygrass import utils
    from grass.pygrass.modules import Module
    Module("g.region", n=40, s=0, e=40, w=0, res=10)
    Module("r.mapcalc",
           expression="%s = row() + (10 * col())" % (pygrpc.test_raster_name),
           overwrite=True)
    utils.create_test_vector_map(pygrpc.test_vector_name)

    tests.addTests(doctest.DocTestSuite(pygrpc))
    tests.addTests(doctest.DocTestSuite(pygrpc.base))
    return tests
def load_tests(loader, tests, ignore):
    # TODO: this must be somewhere when doctest is called, not here
    # TODO: ultimate solution is not to use _ as a buildin in lib/python
    # for now it is the only place where it works
    grass.gunittest.utils.do_doctest_gettext_workaround()

    from grass.pygrass import utils
    from grass.script.core import run_command
    utils.create_test_vector_map(gis.test_vector_name)
    utils.create_test_vector_map(gis.region.test_vector_name)
    run_command("g.region", n=50, s=0, e=60, w=0, res=1)
    run_command("r.mapcalc", expression="%s = 1"%(gis.test_raster_name),
                             overwrite=True)
    run_command("r.mapcalc", expression="%s = 1"%(gis.region.test_raster_name),
                             overwrite=True)
    run_command("g.region", n=40, s=0, e=40, w=0, res=2)

    # this should be called at some top level
    tests.addTests(doctest.DocTestSuite(gis))
    tests.addTests(doctest.DocTestSuite(region))
    return tests
Example #4
0
def load_tests(loader, tests, ignore):
    # TODO: this must be somewhere when doctest is called, not here
    # TODO: ultimate solution is not to use _ as a buildin in lib/python
    # for now it is the only place where it works
    grass.gunittest.utils.do_doctest_gettext_workaround()

    from grass.pygrass import utils
    utils.create_test_vector_map(gvector.test_vector_name)
    utils.create_test_vector_map(gvector.abstract.test_vector_name)
    utils.create_test_vector_map(gvector.geometry.test_vector_name)
    utils.create_test_vector_map(gvector.find.test_vector_name)
    utils.create_test_vector_map(gvector.table.test_vector_name)

    # this should be called at some top level
    tests.addTests(doctest.DocTestSuite(gvector))
    tests.addTests(doctest.DocTestSuite(gvector.abstract))
    tests.addTests(doctest.DocTestSuite(gvector.basic))
    tests.addTests(doctest.DocTestSuite(gvector.find))
    tests.addTests(doctest.DocTestSuite(gvector.geometry))
    tests.addTests(doctest.DocTestSuite(gvector.sql))
    tests.addTests(doctest.DocTestSuite(gvector.table))
    return tests
def load_tests(loader, tests, ignore):
    # TODO: this must be somewhere when doctest is called, not here
    # TODO: ultimate solution is not to use _ as a buildin in lib/python
    # for now it is the only place where it works
    grass.gunittest.utils.do_doctest_gettext_workaround()

    from grass.pygrass import utils
    utils.create_test_vector_map(gvector.test_vector_name)
    utils.create_test_vector_map(gvector.abstract.test_vector_name)
    utils.create_test_vector_map(gvector.geometry.test_vector_name)
    utils.create_test_vector_map(gvector.find.test_vector_name)
    utils.create_test_vector_map(gvector.table.test_vector_name)

    # this should be called at some top level
    tests.addTests(doctest.DocTestSuite(gvector))
    tests.addTests(doctest.DocTestSuite(gvector.abstract))
    tests.addTests(doctest.DocTestSuite(gvector.basic))
    tests.addTests(doctest.DocTestSuite(gvector.find))
    tests.addTests(doctest.DocTestSuite(gvector.geometry))
    tests.addTests(doctest.DocTestSuite(gvector.sql))
    tests.addTests(doctest.DocTestSuite(gvector.table))
    return tests