lingpy.tests package

Subpackages

Submodules

lingpy.tests.test_basictypes module

class lingpy.tests.test_basictypes.Tests

Bases: object

app = ['1', '2', '3']
f = [1.0, 2.0, 3.0, 1.0, 2.0, 3.0]
i = [1, 2, 3]
l = ['1', '2', '3', '+', '1', '2', '3']
s = ['1', '2', '3']
string1 = '1 2 3 + 1 2 3'
string2 = '1 2 3 1 2 3'

lingpy.tests.test_cache module

class lingpy.tests.test_cache.TestCache(methodName='runTest')

Bases: lingpy.tests.util_testing.WithTempDir

test_cache()

lingpy.tests.test_cli module

class lingpy.tests.test_cli.Tests(methodName='runTest')

Bases: lingpy.tests.util_testing.WithTempDir

static run_cli(*args)
test_alignments()
test_lexstat()
test_multiple()
test_ortho_profile()
test_pairwise()
test_profile()
test_settings()
test_wordlist()
lingpy.tests.test_cli.capture(*args)

lingpy.tests.test_config module

class lingpy.tests.test_config.ConfigTest(methodName='runTest')

Bases: lingpy.tests.util_testing.WithTempDir

setUp()

Hook method for setting up the test fixture before exercising it.

test_default()
test_existing_config()
test_new_config()

lingpy.tests.test_log module

class lingpy.tests.test_log.LogTest(methodName='runTest')

Bases: lingpy.tests.util_testing.WithTempDir

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_Logging_context_manager()
static test_convenience()
test_default_config()
test_new_config()

lingpy.tests.test_util module

class lingpy.tests.test_util.Test(methodName='runTest')

Bases: lingpy.tests.util_testing.WithTempDir

test_TextFile()
test_write_text_file()
class lingpy.tests.test_util.TestCombinations(methodName='runTest')

Bases: unittest.case.TestCase

test_combinations2()
class lingpy.tests.test_util.TestJoin(methodName='runTest')

Bases: unittest.case.TestCase

test_as_string()
test_dotjoin()
test_join()

lingpy.tests.util module

Utilities used in lingpy tests

lingpy.tests.util.get_log()

A mock object for lingpy.log to test whether log messages have been emitted.

Returns:Mock instance.
lingpy.tests.util.test_data(*comps)

Access test data files.

Parameters:comps – Path components of the data file path relative to

the test_data dir. :return: Absolute path to the specified test data file.

lingpy.tests.util_testing module

class lingpy.tests.util_testing.WithTempDir(methodName='runTest')

Bases: lingpy.tests.util_testing.WithTempDirMixin, unittest.case.TestCase

Backwards compatible test base class.

class lingpy.tests.util_testing.WithTempDirMixin

Bases: object

Composable test fixture providing access to a temporary directory.

http://nedbatchelder.com/blog/201210/multiple_inheritance_is_hard.html

setUp()
tearDown()
tmp_path(*comps)
lingpy.tests.util_testing.capture(func, *args, **kw)
lingpy.tests.util_testing.capture_all(func, *args, **kw)

Module contents