Changeset b0695c6 in mod_gnutls for test/mgstest/tests.py


Ignore:
Timestamp:
Apr 7, 2020, 2:44:48 PM (15 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, master, proxy-ticket
Children:
0484b31
Parents:
1a85a3d
Message:

Pass parsed YAML config to mgstest.tests.run_test_conf

Parsing the config in runtest.py has the advantage that the parsed
config is available there, too, e.g. to be read by hooks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mgstest/tests.py

    r1a85a3d rb0695c6  
    545545    """Load and run a test configuration.
    546546
    547     The test_conf parameter must be a YAML file, defining one or more
    548     TestConnections, to be run in order. The other three parameters
    549     are forwarded to TestConnection.run().
     547    The test_conf parameter must either a single TestConnection
     548    object, or a list of such objects to be run in order. The other
     549    three parameters are forwarded to TestConnection.run().
    550550
    551551    """
    552552    conns = None
    553553
    554     config = yaml.load(test_config, Loader=yaml.Loader)
    555     if type(config) is TestConnection:
    556         conns = [config]
    557     elif type(config) is list:
     554    if type(test_config) is TestConnection:
     555        conns = [test_config]
     556    elif type(test_config) is list:
    558557        # assume list elements are connections
    559         conns = config
     558        conns = test_config
    560559    else:
    561         raise TypeError(f'Unsupported configuration: {config!r}')
     560        raise TypeError(f'Unsupported configuration: {test_config!r}')
    562561    sys.stdout.flush()
    563562
Note: See TracChangeset for help on using the changeset viewer.