Skip to content

Commit

Permalink
Merge branch 'main' into freebsd-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin authored Sep 5, 2023
2 parents b22c273 + 9bf350b commit bee0bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ are always available. They are listed here in alphabetical order.


.. class:: slice(stop)
slice(start, stop, step=1)
slice(start, stop, step=None)

Return a :term:`slice` object representing the set of indices specified by
``range(start, stop, step)``. The *start* and *step* arguments default to
Expand Down
5 changes: 3 additions & 2 deletions Lib/test/test_unittest/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import pickle
from test import support
from test.support import import_helper
import test.test_importlib.util

import unittest
import unittest.mock
Expand Down Expand Up @@ -826,6 +825,8 @@ def restore():
'as dotted module names')

def test_discovery_failed_discovery(self):
from test.test_importlib import util

loader = unittest.TestLoader()
package = types.ModuleType('package')

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

0 comments on commit bee0bf7

Please sign in to comment.