Horje
python pytest use same tests for multiple modules Code Example
python pytest use same tests for multiple modules
def pytest_addoption(parser):
    parser.addoption("--libname", action="append", default=[],
                     help="name of the tested library")

    
def pytest_generate_tests(metafunc):
    if 'libname' in metafunc.fixturenames:
        metafunc.parametrize("libname", metafunc.config.option.libname)

        
def test_import(libname):
    import importlib
    tested_library = importlib.import_module(libname)
    # asserts...




Python

Related
how to get cube root python Code Example how to get cube root python Code Example
python tkinter importieren Code Example python tkinter importieren Code Example
fibbonachi python Code Example fibbonachi python Code Example
python messaging networking Code Example python messaging networking Code Example
program to demonstrate encapsulation in python Code Example program to demonstrate encapsulation in python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9