Skip to content

Commit b0b209f

Browse files
NO-SNOW: Fix session package list cleanup issue in doctests (#4028)
1 parent 183f27c commit b0b209f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/snowflake/snowpark/session.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,13 +1794,13 @@ def replicate_local_environment(
17941794
17951795
Example::
17961796
1797-
>>> import sys, pytest; _ = (sys.version_info[:2] not in ((3, 9), (3, 12))) or pytest.skip()
1797+
>>> import sys
17981798
>>> from snowflake.snowpark.functions import udf
17991799
>>> import numpy
18001800
>>> import pandas
18011801
>>> # test_requirements.txt contains "numpy" and "pandas"
18021802
>>> session.custom_package_usage_config = {"enabled": True, "force_push": True} # Recommended configuration
1803-
>>> session.replicate_local_environment(ignore_packages={"snowflake-snowpark-python", "snowflake-connector-python", "urllib3", "tzdata", "numpy"}, relax=True)
1803+
>>> session.replicate_local_environment(ignore_packages={"snowflake-snowpark-python", "snowflake-connector-python", "urllib3", "tzdata", "numpy"}, relax=True) # doctest: +SKIP
18041804
>>> @udf
18051805
... def get_package_name_udf() -> list:
18061806
... return [numpy.__name__, pandas.__name__]
@@ -1815,8 +1815,8 @@ def replicate_local_environment(
18151815
|] |
18161816
--------------
18171817
<BLANKLINE>
1818-
>>> session.clear_packages()
1819-
>>> session.clear_imports()
1818+
>>> session.clear_packages() # doctest: +SKIP
1819+
>>> session.clear_imports() # doctest: +SKIP
18201820
18211821
Args:
18221822
ignore_packages: Set of package names that will be ignored.

0 commit comments

Comments
 (0)