def test_generate_dist(fake_project_dir): with pypi.generate_dist(fake_project_dir.as_posix()) as (metadata, dist_files): assert metadata.name == 'fake_project' assert len(dist_files) == 2 for dist_file in dist_files: assert dist_file.exists() assert dist_file.is_file()
def test_restore_cwd(fake_project_dir): cwd = os.getcwd() with pypi.generate_dist(fake_project_dir.as_posix()) as (metadata, dist_files): pass assert cwd == os.getcwd()