refactor: Override options redesign
* Add test for defaults, fix platform detection * Improve correctness of reader.identifier with block * Fix options test to be multiplatform * 'Refactored by Sourcery' docs: write a section on overrides tests: test docker launches feat: add identifiers to launches test: add test for correct build step generation Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -15,9 +15,6 @@ class ArgsInterceptor:
|
||||
self.kwargs = kwargs
|
||||
|
||||
|
||||
MOCK_PACKAGE_DIR = Path("some_package_dir")
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_protection(monkeypatch):
|
||||
"""
|
||||
@@ -41,22 +38,8 @@ def mock_protection(monkeypatch):
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def fake_package_dir(monkeypatch):
|
||||
"""
|
||||
Monkey-patch enough for the main() function to run
|
||||
"""
|
||||
real_path_exists = Path.exists
|
||||
|
||||
def mock_path_exists(path):
|
||||
if path == MOCK_PACKAGE_DIR / "setup.py":
|
||||
return True
|
||||
else:
|
||||
return real_path_exists(path)
|
||||
|
||||
args = ["cibuildwheel", str(MOCK_PACKAGE_DIR)]
|
||||
monkeypatch.setattr(Path, "exists", mock_path_exists)
|
||||
monkeypatch.setattr(sys, "argv", args)
|
||||
return args
|
||||
def fake_package_dir_autouse(fake_package_dir):
|
||||
pass
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
||||
Reference in New Issue
Block a user