Commit d412cb31 authored by Carl Schaffer's avatar Carl Schaffer
Browse files

adding easy access to test data for header versions

parent 54666dea
from .__version__ import __version__
from .data_accessor import TestDataAccessor
from .header_files_accessor import get_header_version_data
test_data = TestDataAccessor()
test_data_versions = get_header_version_data()
from os import walk
from os.path import join, dirname, basename
from .data_accessor import AttrDict
def get_header_version_data():
Retrieve the data from the header_versions folder. Data is returned in an attribute dictionary
structured as the folder structure of the source folder
:return: test_data_header_versions
test_data_header_versions = AttrDict()
folder = join(dirname(__file__), "header_versions")
for root, _ ,files in walk(folder):
if not files: continue
test_data_header_versions[basename(root)]=[join(root,f) for f in files]
return test_data_header_versions
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment