bsb_test package¶
Module contents¶
Helpers for better and more complete tests for component developers of the BSB framework.
- class bsb_test.FixedPosConfigFixture¶
Bases:
object- cfg: Configuration¶
- setUp()¶
- class bsb_test.NumpyTestCase¶
Bases:
object- assertAll(a, msg='', /, **kwargs)¶
- assertClose(a, b, msg='', /, **kwargs)¶
- assertNan(a, msg='', /, **kwargs)¶
- assertNotClose(a, b, msg='', /, **kwargs)¶
- class bsb_test.RandomStorageFixture¶
Bases:
object- classmethod random_storage()¶
- setUp()¶
- classmethod setUpClass()¶
- classmethod tearDownClass()¶
- class bsb_test.SpoofedEntryPoint(name, value, group, advert)¶
Bases:
EntryPoint- load()¶
Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object.
- bsb_test.get_all_morphology_paths(suffix='')¶
- bsb_test.get_data_path(*paths)¶
- bsb_test.get_morphology_path(file)¶
- bsb_test.plugin_context(plugin_dict)¶
- bsb_test.skip_test_allen_api()¶
- bsb_test.spoof_plugin(category, name, obj)¶
- bsb_test.spoof_plugins(plugin_dict)¶
Submodules¶
bsb_test.engines module¶
This module contains sets of unittests per interface of the storage engines. This allows authors of storage engines to test their implementations against a standardized set of tests.
Usage:
from bsb.unittest.engines import TestStorage
- class TestMyStorage(TestStorage, unittest.TestCase, engine_name=”my_storage”):
pass
This will import all tests of TestStorage to your test suite, given that your storage engine is available as “my_storage” (e.g. bsb-hdf5 would use engine_name=”hdf5”).
- class bsb_test.engines.TestConnectivitySet¶
Bases:
FixedPosConfigFixture,RandomStorageFixture,NumpyTestCase- check_a2a_flat_iter(itr, dirs, lcount, gcount)¶
- setUp()¶
- test_attrs()¶
- test_connect_connect()¶
- test_flat_iter()¶
- test_io()¶
- test_labelled_cells()¶
- test_load_all()¶
- test_load_local()¶
- test_local()¶
- test_nested_iter()¶
- test_require()¶
- class bsb_test.engines.TestEngine¶
Bases:
RandomStorageFixture- setUp()¶
- class bsb_test.engines.TestMorphologyRepository¶
Bases:
NumpyTestCase,RandomStorageFixture- setUp()¶
- test_swc_ldc_mdc()¶
- test_swc_saveload()¶
- test_swc_saveload_eq()¶
- class bsb_test.engines.TestPlacementSet¶
Bases:
FixedPosConfigFixture,RandomStorageFixture,NumpyTestCase- setUp()¶
- test_4chunks_25cells()¶
- test_chunk_size()¶
- test_clear()¶
- test_create()¶
- test_example_labels()¶
- test_exists()¶
- test_get_all_chunks()¶
- test_init()¶
- test_label()¶
- test_label_by_mask_errors()¶
- test_label_errors()¶
- test_label_filter()¶
- test_list_input()¶
- test_load_ids()¶
- test_load_morphologies()¶
- test_load_no_morphologies()¶
- test_load_no_rotations()¶
- test_load_positions()¶
- test_load_rotations()¶
- test_overwrite_labels()¶
- test_require()¶
bsb_test.exceptions module¶
- exception bsb_test.exceptions.FixtureError¶
Bases:
BsbTestError
bsb_test.parallel module¶
- bsb_test.parallel.internet_connection()¶
- bsb_test.parallel.on_main_only(f)¶
- bsb_test.parallel.serial_setup(cls)¶
- bsb_test.parallel.skip_nointernet(o)¶
- bsb_test.parallel.skip_parallel(o)¶
- bsb_test.parallel.skip_serial(o)¶
- bsb_test.parallel.timeout(timeout, abort=False)¶