forked from continental/image-statistics-matching
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stub_operation.py
36 lines (25 loc) · 903 Bytes
/
stub_operation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# pylint: disable=missing-module-docstring (C0114)
# pylint: disable=missing-function-docstring (C0116)
import numpy as np
import pytest
from matching import Operation
from tests import CHANNELS_DEFAULT
class StubOperationMul(Operation):
"""
Stub Operation class for stub testing
"""
# pylint: disable=too-few-public-methods (R0903)
def _apply(self, source: np.ndarray,
reference: np.ndarray) -> np.ndarray:
return source * reference
class StubOperationSum(Operation):
"""
Stub Operation class for stub testing
"""
# pylint: disable=too-few-public-methods (R0903)
def _apply(self, source: np.ndarray,
reference: np.ndarray) -> np.ndarray:
return source + reference
@pytest.fixture(name='stub_operation')
def fixture_stub_operation() -> StubOperationMul:
return StubOperationMul(CHANNELS_DEFAULT, True)