iker-python-common 1.0.19__tar.gz → 1.0.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/PKG-INFO +1 -1
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/PKG-INFO +1 -1
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/testutils_test.py +49 -1
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.editorconfig +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.github/workflows/pr.yml +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.github/workflows/push.yml +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.gitignore +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/MANIFEST.in +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/README.md +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/VERSION +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/pyproject.toml +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/config/config.cfg +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/csv/data.csv +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/csv/data.tsv +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.bar +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.baz +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.foo +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/setup.cfg +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/setup.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/__init__.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/__init__.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/argutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/config.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/csv.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dbutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dockerutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dtutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/funcutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/jsonutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/logger.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/numutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/randutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/retry.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/s3utils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/sequtils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/shutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/span.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/strutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/testutils.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/SOURCES.txt +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/not-zip-safe +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/requires.txt +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/top_level.txt +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/__init__.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/argutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/config_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/csv_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dbutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dtutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/funcutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/jsonutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/logger_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/numutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/randutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/retry_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/s3utils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/sequtils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/shutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/span_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/strutils_test.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/docker_fixtures.py +0 -0
- {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/iker_test.py +0 -0
|
@@ -5,8 +5,9 @@ from dataclasses import dataclass
|
|
|
5
5
|
from decimal import Decimal
|
|
6
6
|
|
|
7
7
|
import ddt
|
|
8
|
+
import pytest
|
|
8
9
|
|
|
9
|
-
from iker.common.utils.testutils import nested_approx, return_callee
|
|
10
|
+
from iker.common.utils.testutils import nested_approx, return_callee, throw_callee
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
@dataclass(eq=True, frozen=True)
|
|
@@ -357,3 +358,50 @@ class TestUtilsTest(unittest.TestCase):
|
|
|
357
358
|
dummy_int=1,
|
|
358
359
|
dummy_float=1.0,
|
|
359
360
|
dummy_str="dummy_string")
|
|
361
|
+
|
|
362
|
+
def test_return_callee__multiple_calls(self):
|
|
363
|
+
callee_0 = return_callee(0)
|
|
364
|
+
callee_1 = return_callee(1)
|
|
365
|
+
callee_2 = return_callee(4)
|
|
366
|
+
callee_3 = return_callee(9)
|
|
367
|
+
|
|
368
|
+
self.assertEqual(callee_1(1), 1)
|
|
369
|
+
self.assertEqual(callee_2(2), 4)
|
|
370
|
+
self.assertEqual(callee_2(2), 4)
|
|
371
|
+
self.assertEqual(callee_3(3), 9)
|
|
372
|
+
self.assertEqual(callee_3(3), 9)
|
|
373
|
+
self.assertEqual(callee_3(3), 9)
|
|
374
|
+
|
|
375
|
+
callee_0.assert_not_called()
|
|
376
|
+
callee_0.assert_not_called_with()(1)
|
|
377
|
+
callee_0.assert_not_called_with()(2)
|
|
378
|
+
callee_0.assert_not_called_with()(3)
|
|
379
|
+
|
|
380
|
+
callee_1.assert_called()
|
|
381
|
+
callee_1.assert_called_with()(1)
|
|
382
|
+
callee_1.assert_not_called_with()(2)
|
|
383
|
+
callee_1.assert_not_called_with()(3)
|
|
384
|
+
callee_1.assert_called_once()
|
|
385
|
+
callee_1.assert_called_once_with()(1)
|
|
386
|
+
callee_1.assert_called_times(1)
|
|
387
|
+
callee_1.assert_called_times_with(1)(1)
|
|
388
|
+
|
|
389
|
+
callee_2.assert_called()
|
|
390
|
+
callee_2.assert_not_called_with()(1)
|
|
391
|
+
callee_2.assert_called_with()(2)
|
|
392
|
+
callee_2.assert_not_called_with()(3)
|
|
393
|
+
callee_2.assert_called_times(2)
|
|
394
|
+
callee_2.assert_called_times_with(2)(2)
|
|
395
|
+
|
|
396
|
+
callee_3.assert_called()
|
|
397
|
+
callee_3.assert_not_called_with()(1)
|
|
398
|
+
callee_3.assert_not_called_with()(2)
|
|
399
|
+
callee_3.assert_called_with()(3)
|
|
400
|
+
callee_3.assert_called_times(3)
|
|
401
|
+
callee_3.assert_called_times_with(3)(3)
|
|
402
|
+
|
|
403
|
+
def test_throw_callee(self):
|
|
404
|
+
callee = throw_callee(ValueError)
|
|
405
|
+
|
|
406
|
+
with pytest.raises(ValueError):
|
|
407
|
+
callee(object())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/config/config.cfg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.bar
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.baz
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.foo
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dockerutils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/config_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/csv_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dbutils_test.py
RENAMED
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dtutils_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/logger_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/retry_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/s3utils_test.py
RENAMED
|
File without changes
|
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/shutils_test.py
RENAMED
|
File without changes
|
{iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/span_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|