Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanheemstra committed Oct 31, 2024
1 parent a4cb389 commit f1be32e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions threagile-builder/tests/conftest.py
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)

0 comments on commit f1be32e

Please sign in to comment.