Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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"]
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"]