generated from vanHeemstraSystems/template-default-repository
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4cb389
commit f1be32e
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SPDX-FileCopyrightText: 2024-present Willem van Heemstra <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
import pytest | ||
from click.testing import CliRunner as __CliRunner | ||
|
||
|
||
class CliRunner(__CliRunner): | ||
def __init__(self, command): | ||
super().__init__() | ||
self._command = command | ||
|
||
def __call__(self, *args, **kwargs): | ||
# Exceptions should always be handled | ||
kwargs.setdefault('catch_exceptions', False) | ||
|
||
return self.invoke(self._command, args, **kwargs) | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
def threagile_builder(): | ||
from threagile_builder import cli | ||
|
||
return CliRunner(cli.threagile_builder) |