Testdata module

The testdata module contain the test datasets used for documenting functionality and testing.

The following utility functions are available to access the datasets:

Function

Description

get_testfiles()

Returns the available test files.

get_testpath()

Returns path to the requested test file.

araucaria.testdata.utils.get_testfiles()[source]

Returns the available test files.

Parameters

None

Return type

list

Returns

List with available test files.

Example

>>> from araucaria.testdata import get_testfiles
>>> testfiles = get_testfiles()
>>> for file in testfiles:
...    if 'dnd' in file:
...        print(file)
dnd_glitchfile.dat
dnd_testfile1.dat
dnd_testfile2.dat
dnd_testfile3.dat
araucaria.testdata.utils.get_testpath(filename)[source]

Returns the path to the requested test file.

Parameters

filename (str) – Name of the requested test file.

Return type

Path

Returns

Path to the requested test file.

Example

>>> from pathlib import Path
>>> from araucaria.testdata import get_testpath
>>> path = get_testpath('dnd_testfile1.dat')
>>> isinstance(path, Path)
True