Skip to content

Commit bee0bf7

Browse files
authored
Merge branch 'main' into freebsd-ci
2 parents b22c273 + 9bf350b commit bee0bf7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Doc/library/functions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ are always available. They are listed here in alphabetical order.
16311631

16321632

16331633
.. class:: slice(stop)
1634-
slice(start, stop, step=1)
1634+
slice(start, stop, step=None)
16351635

16361636
Return a :term:`slice` object representing the set of indices specified by
16371637
``range(start, stop, step)``. The *start* and *step* arguments default to

Lib/test/test_unittest/test_discovery.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import pickle
77
from test import support
88
from test.support import import_helper
9-
import test.test_importlib.util
109

1110
import unittest
1211
import unittest.mock
@@ -826,6 +825,8 @@ def restore():
826825
'as dotted module names')
827826

828827
def test_discovery_failed_discovery(self):
828+
from test.test_importlib import util
829+
829830
loader = unittest.TestLoader()
830831
package = types.ModuleType('package')
831832

@@ -837,7 +838,7 @@ def _import(packagename, *args, **kwargs):
837838
# Since loader.discover() can modify sys.path, restore it when done.
838839
with import_helper.DirsOnSysPath():
839840
# Make sure to remove 'package' from sys.modules when done.
840-
with test.test_importlib.util.uncache('package'):
841+
with util.uncache('package'):
841842
with self.assertRaises(TypeError) as cm:
842843
loader.discover('package')
843844
self.assertEqual(str(cm.exception),

0 commit comments

Comments
 (0)