_my_dir = os.path.dirname(os.path.abspath(__file__)) # Use random for getting sets of elements rand_seed = 39466 # from random.org # Load all the metadata once data_dir = bse.api._default_data_dir bs_metadata = bse.get_metadata() bs_names = list(bs_metadata.keys()) bs_read_formats = list(bse.get_reader_formats().keys()) bs_write_formats = list(bse.get_writer_formats()) + [None] bs_write_formats_ecp = list(bse.get_writer_formats(['scalar_ecp' ]).keys()) + [None] bs_write_formats_noecp = list( set(bs_write_formats) - set(bs_write_formats_ecp)) ref_formats = list(bse.get_reference_formats().keys()) + [None] all_families = bse.get_families() all_roles = bse.get_roles() true_false = [True, False] # All basis names/versions combinations bs_names_vers = [] for k, v in bs_metadata.items(): for ver in v['versions'].keys(): bs_names_vers.append((k, ver)) # Directory the CLI executables _parent_dir = os.path.abspath(os.path.join(_my_dir, os.pardir)) cli_dir = os.path.join(_parent_dir, 'cli') # Directory with some fake data
def test_get_reader_formats(): '''Test the get_reader_formats function''' bse.get_reference_formats()