Skip to content

Commit 7e8c60a

Browse files
committed
addressed PR comments
1 parent 66b6974 commit 7e8c60a

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.kokoro/samples/python3.14/common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env_vars: {
1616
# Declare build specific Cloud project.
1717
env_vars: {
1818
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
19-
value: "python-docs-samples-tests-313"
19+
value: "python-docs-samples-tests-314"
2020
}
2121

2222
env_vars: {

samples/snippets/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]:
8989

9090
# DO NOT EDIT - automatically generated.
9191
# All versions used to test samples.
92-
ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
92+
ALL_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
9393

9494
# Any default versions that should be ignored.
9595
IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"]

tests/unit/test_pandas_backports.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222

2323
def _import_side_effect(module_name, result_return=None, result_raise=None):
2424
"""
25-
Builds a side-effect for mocking the import function.
25+
Builds a side-effect for mocking the import function.
2626
If the imported package matches `name`, it will return or raise based on
2727
arguments. Otherwise, it will default to regular import behaviour
2828
"""
29+
2930
def _impl(name, *args, **kwargs):
3031
if name == module_name:
3132
if result_raise:
@@ -34,6 +35,7 @@ def _impl(name, *args, **kwargs):
3435
return result_return
3536
else:
3637
return REAL_IMPORT(name, *args, **kwargs)
38+
3739
return _impl
3840

3941

@@ -50,8 +52,10 @@ def test_import_default_module_found(mock_import):
5052

5153

5254
@mock.patch("builtins.__import__")
53-
def test_import_default_module_not_foundX(mock_import):
54-
mock_import.side_effect = _import_side_effect("module_name", result_raise=ModuleNotFoundError)
55+
def test_import_default_module_not_found(mock_import):
56+
mock_import.side_effect = _import_side_effect(
57+
"module_name", result_raise=ModuleNotFoundError
58+
)
5559

5660
default_class = type("OpsMixin", (), {}) # Dummy class
5761
result = pandas_backports.import_default("module_name", default=default_class)

0 commit comments

Comments
 (0)