mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
This adds testing of well-formed rust projects and workspaces, using both `Cargo.toml` and `rust-project.json` manifests.
16 lines
283 B
Python
16 lines
283 B
Python
import pytest
|
|
import shutil
|
|
|
|
class _Manifests:
|
|
def __init__(self, cwd):
|
|
self.dir = cwd / "manifests"
|
|
|
|
def select(self, name: str):
|
|
(self.dir / name).rename(name)
|
|
shutil.rmtree(self.dir)
|
|
|
|
|
|
@pytest.fixture
|
|
def manifests(cwd):
|
|
return _Manifests(cwd)
|