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.
Files changed (71) hide show
  1. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/PKG-INFO +1 -1
  2. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/PKG-INFO +1 -1
  3. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/testutils_test.py +49 -1
  4. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.editorconfig +0 -0
  5. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.github/workflows/pr.yml +0 -0
  6. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.github/workflows/push.yml +0 -0
  7. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/.gitignore +0 -0
  8. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/MANIFEST.in +0 -0
  9. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/README.md +0 -0
  10. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/VERSION +0 -0
  11. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/pyproject.toml +0 -0
  12. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/config/config.cfg +0 -0
  13. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/csv/data.csv +0 -0
  14. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/csv/data.tsv +0 -0
  15. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.baz/file.bar.baz +0 -0
  16. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.baz/file.foo.bar +0 -0
  17. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.baz/file.foo.baz +0 -0
  18. {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
  19. {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
  20. {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
  21. {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
  22. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.bar +0 -0
  23. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.baz +0 -0
  24. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/resources/unittest/shutils/dir.foo/file.foo +0 -0
  25. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/setup.cfg +0 -0
  26. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/setup.py +0 -0
  27. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/__init__.py +0 -0
  28. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/__init__.py +0 -0
  29. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/argutils.py +0 -0
  30. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/config.py +0 -0
  31. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/csv.py +0 -0
  32. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dbutils.py +0 -0
  33. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dockerutils.py +0 -0
  34. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/dtutils.py +0 -0
  35. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/funcutils.py +0 -0
  36. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/jsonutils.py +0 -0
  37. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/logger.py +0 -0
  38. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/numutils.py +0 -0
  39. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/randutils.py +0 -0
  40. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/retry.py +0 -0
  41. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/s3utils.py +0 -0
  42. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/sequtils.py +0 -0
  43. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/shutils.py +0 -0
  44. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/span.py +0 -0
  45. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/strutils.py +0 -0
  46. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker/common/utils/testutils.py +0 -0
  47. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/SOURCES.txt +0 -0
  48. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/dependency_links.txt +0 -0
  49. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/not-zip-safe +0 -0
  50. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/requires.txt +0 -0
  51. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/src/iker_python_common.egg-info/top_level.txt +0 -0
  52. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/__init__.py +0 -0
  53. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/argutils_test.py +0 -0
  54. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/config_test.py +0 -0
  55. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/csv_test.py +0 -0
  56. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dbutils_test.py +0 -0
  57. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dockerutils_test.py +0 -0
  58. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/dtutils_test.py +0 -0
  59. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/funcutils_test.py +0 -0
  60. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/jsonutils_test.py +0 -0
  61. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/logger_test.py +0 -0
  62. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/numutils_test.py +0 -0
  63. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/randutils_test.py +0 -0
  64. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/retry_test.py +0 -0
  65. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/s3utils_test.py +0 -0
  66. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/sequtils_test.py +0 -0
  67. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/shutils_test.py +0 -0
  68. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/span_test.py +0 -0
  69. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/common/utils/strutils_test.py +0 -0
  70. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/docker_fixtures.py +0 -0
  71. {iker_python_common-1.0.19 → iker_python_common-1.0.20}/test/iker_tests/iker_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iker-python-common
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: iker-python-common
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3.11
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -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())