A search engine for MMP's eASLRB.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
asl-rulebook2/asl_rulebook2/tests/utils.py

19 lines
568 B

""" Helper utilities. """
import os
from asl_rulebook2.tests import pytest_options
# ---------------------------------------------------------------------
def for_each_easlrb_version( func ):
"""Run tests for each version of the eASLRB."""
assert pytest_options.easlrb_path
base_dir = pytest_options.easlrb_path
ncalls = 0
for name in os.listdir( base_dir ):
dname = os.path.join( base_dir, name )
if os.path.isfile( os.path.join( dname, "eASLRB.pdf" ) ):
func( dname )
ncalls += 1
assert ncalls > 0