How to use the portray.config.project function in portray

To help you get started, we’ve selected a few portray examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timothycrosley / portray / tests / test_config.py View on Github external
def test_project_setup_py(temporary_dir):
    with open(os.path.join(temporary_dir, "setup.py"), "w") as setup_file:
        setup_file.write(FAKE_SETUP_FILE)

    project_config = config.project(directory=temporary_dir, config_file="")
    assert project_config["modules"] == ["fake"]
github timothycrosley / portray / tests / test_config.py View on Github external
def test_project_flit_setup(temporary_dir):
    with open(os.path.join(temporary_dir, "pyproject.toml"), "w") as setup_file:
        setup_file.write(FAKE_PYPROJECT_TOML_FLIT)

    project_config = config.project(directory=temporary_dir, config_file="pyproject.toml")
    assert project_config["modules"] == ["preconvert"]