Add unit test for the option parsing
This commit is contained in:
@@ -70,5 +70,14 @@ def platform(request, monkeypatch):
|
||||
@pytest.fixture
|
||||
def intercepted_build_args(platform, monkeypatch):
|
||||
intercepted = ArgsInterceptor()
|
||||
monkeypatch.setattr(globals()[platform], 'build', intercepted)
|
||||
|
||||
if platform == 'linux':
|
||||
monkeypatch.setattr(linux, 'build', intercepted)
|
||||
elif platform == 'macos':
|
||||
monkeypatch.setattr(macos, 'build', intercepted)
|
||||
elif platform == 'windows':
|
||||
monkeypatch.setattr(windows, 'build', intercepted)
|
||||
else:
|
||||
raise ValueError(f'unknown platform value: {platform}')
|
||||
|
||||
return intercepted
|
||||
|
||||
Reference in New Issue
Block a user