Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
tests._test_utils Namespace Reference

Data Structures

class  TestCase
 

Functions

 get_temp_compressed_name (filename)
 
 get_temp_uncompressed_name (filename)
 
 bind_method_args (method, *args, **kwargs)
 
 generate_test_methods (test_case_class, for_decompression=False, variants=None)
 

Variables

 project_dir = os.path.abspath(os.path.join(__file__, '..', '..', '..'))
 
 src_dir = os.path.join(project_dir, 'python')
 
 test_dir = os.path.join(project_dir, 'tests')
 
str python_exe = sys.executable or 'python'
 
 bro_path = os.path.join(src_dir, 'bro.py')
 
list BRO_ARGS = [python_exe, bro_path]
 
str platform_lib_name
 
 build_dir = os.path.join(project_dir, 'bin', platform_lib_name)
 
 TEST_ENV = os.environ.copy()
 
 TESTDATA_DIR = os.path.join(test_dir, 'testdata')
 
list TESTDATA_FILES
 
list TESTDATA_PATHS = [os.path.join(TESTDATA_DIR, f) for f in TESTDATA_FILES]
 
 TESTDATA_PATHS_FOR_DECOMPRESSION
 
 TEMP_DIR = tempfile.mkdtemp()
 
list TESTDATA_PATH_CANDIDATES
 

Function Documentation

◆ bind_method_args()

bind_method_args ( method,
* args,
** kwargs )

◆ generate_test_methods()

generate_test_methods ( test_case_class,
for_decompression = False,
variants = None )

◆ get_temp_compressed_name()

get_temp_compressed_name ( filename)

◆ get_temp_uncompressed_name()

get_temp_uncompressed_name ( filename)

Variable Documentation

◆ BRO_ARGS

list BRO_ARGS = [python_exe, bro_path]

◆ bro_path

bro_path = os.path.join(src_dir, 'bro.py')

◆ build_dir

build_dir = os.path.join(project_dir, 'bin', platform_lib_name)

◆ platform_lib_name

str platform_lib_name
Initial value:
1= 'lib.{platform}-{version[0]}.{version[1]}'.format(
2 platform=sysconfig.get_platform(), version=sys.version_info)

◆ project_dir

project_dir = os.path.abspath(os.path.join(__file__, '..', '..', '..'))

◆ python_exe

str python_exe = sys.executable or 'python'

◆ src_dir

src_dir = os.path.join(project_dir, 'python')

◆ TEMP_DIR

TEMP_DIR = tempfile.mkdtemp()

◆ test_dir

test_dir = os.path.join(project_dir, 'tests')

◆ TEST_ENV

TEST_ENV = os.environ.copy()

◆ TESTDATA_DIR

TESTDATA_DIR = os.path.join(test_dir, 'testdata')

◆ TESTDATA_FILES

list TESTDATA_FILES
Initial value:
1= [
2 'empty', # Empty file
3 '10x10y', # Small text
4 'alice29.txt', # Large text
5 'random_org_10k.bin', # Small data
6 'mapsdatazrh', # Large data
7]

◆ TESTDATA_PATH_CANDIDATES

list TESTDATA_PATH_CANDIDATES
Initial value:
1= [
2 os.path.join(TESTDATA_DIR, f) for f in TESTDATA_FILES
3]

◆ TESTDATA_PATHS

list TESTDATA_PATHS = [os.path.join(TESTDATA_DIR, f) for f in TESTDATA_FILES]

◆ TESTDATA_PATHS_FOR_DECOMPRESSION

TESTDATA_PATHS_FOR_DECOMPRESSION
Initial value:
1= glob.glob(
2 os.path.join(TESTDATA_DIR, '*.compressed'))