-
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
5e9a1fd
commit 88821c4
Showing
5 changed files
with
88 additions
and
36 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
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
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
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,40 @@ | ||
from argparse import Namespace | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
from chris_plugin import chris_plugin | ||
|
||
|
||
@chris_plugin(singleton=False) | ||
def __returns_none_fs(_options, _path) -> None: | ||
pass | ||
|
||
|
||
@chris_plugin(singleton=False) | ||
def __returns_int_fs(_options, _path) -> int: | ||
return 400 | ||
|
||
|
||
@chris_plugin(singleton=False) | ||
def __returns_none_ds(_options, _p1, _p2) -> None: | ||
pass | ||
|
||
|
||
@chris_plugin(singleton=False) | ||
def __returns_int_ds(_options, _p1, _p2) -> int: | ||
return 500 | ||
|
||
|
||
_options = Namespace() | ||
_path = Path('/tmp') | ||
|
||
|
||
@pytest.mark.parametrize('result, expected', [ | ||
(__returns_none_fs(_options, _path), None), | ||
(__returns_int_fs(_options, _path), 400), | ||
(__returns_none_ds(_options, _path, _path), None), | ||
(__returns_int_ds(_options, _path, _path), 500), | ||
]) | ||
def test_main_return(result, expected): | ||
... |
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