generated from jCloud/repository-template
refactor(utils)!: move fit_row_length to utility module
Moved the _fit_row_length function from the Python generator core module to fit_row_length in the utility module. The public exports definition of the utility module and all imports were updated. The test module was also moved to the appropriate new path and the testing functions were renamed.
This commit is contained in:
3 files changed
+31
-30
No files matched your search
+5
-5
@@ -14,7 +14,7 @@
|
||||
|
||||
import pytest
|
||||
|
||||
from src.jcloud_docsgen.core.python._core import _fit_row_length
|
||||
from src.jcloud_docsgen.utils import fit_row_length
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -37,8 +37,8 @@ from src.jcloud_docsgen.core.python._core import _fit_row_length
|
||||
(3, (1, 2, 3), (1, 2, 3)),
|
||||
],
|
||||
)
|
||||
def test__fit_row_length(expected_length, row, expected):
|
||||
assert _fit_row_length(expected_length, row) == expected
|
||||
def test_fit_row_length(expected_length, row, expected):
|
||||
assert fit_row_length(expected_length, row) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -60,7 +60,7 @@ def test__fit_row_length(expected_length, row, expected):
|
||||
(-42, ValueError),
|
||||
],
|
||||
)
|
||||
def test__fit_row_length_exceptions(expected_length, row, expected_exception):
|
||||
def test_fit_row_length_exceptions(expected_length, row, expected_exception):
|
||||
with pytest.raises(expected_exception) as exc_info:
|
||||
_fit_row_length(expected_length, row)
|
||||
fit_row_length(expected_length, row)
|
||||
assert str(exc_info.value) == 'expected must be larger than or equal 0.'
|
||||
Reference in new issue
Block a user