Родитель
723f3ded46
Коммит
73672f92e7
|
@ -1,12 +0,0 @@
|
|||
import pytest
|
||||
|
||||
from torchmetrics.sample_module import my_sample_func
|
||||
|
||||
|
||||
@pytest.mark.parametrize('a,b,expected', [
|
||||
pytest.param(1, 2, 3),
|
||||
pytest.param(-1, 1., 0),
|
||||
])
|
||||
def test_sample_func(a, b, expected):
|
||||
"""Sample test case with parametrization."""
|
||||
assert my_sample_func(a, b) == expected
|
|
@ -1,15 +0,0 @@
|
|||
"""
|
||||
Sample...
|
||||
"""
|
||||
|
||||
|
||||
def my_sample_func(a: int, b: float) -> float:
|
||||
"""Sample function.
|
||||
|
||||
Doctest are good for creating examples in dcos and also hawing soma basic code coverage...
|
||||
|
||||
Example:
|
||||
>>> my_sample_func(1, 1.5)
|
||||
2.5
|
||||
"""
|
||||
return a + b
|
Загрузка…
Ссылка в новой задаче