Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Lib/test/test_os/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,20 @@ def test_getcwdb(self):
self.assertIsInstance(cwd, bytes)
self.assertEqual(os.fsdecode(cwd), os.getcwd())

def test_type_fqdn(self):
def fqdn(obj):
return (obj.__module__, obj.__qualname__)

native = os.name
self.assertEqual(fqdn(os.stat_result), ("os", "stat_result"))
self.assertEqual(fqdn(os.times_result), (native, "times_result"))
if hasattr(os, "statvfs_result"):
self.assertEqual(fqdn(os.statvfs_result), ("os", "statvfs_result"))
if hasattr(os, "sched_param"):
self.assertEqual(fqdn(os.sched_param), (native, "sched_param"))
if hasattr(os, "waitid_result"):
self.assertEqual(fqdn(os.waitid_result), (native, "waitid_result"))


# Tests creating TESTFN
class FileTests(unittest.TestCase):
Expand Down
7 changes: 5 additions & 2 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,12 +855,15 @@ def get_excepted_output(self, *args):
return 10, None

def invoke_command_line(self, *args):
args = ["-m", "site", *args]
cmd_args = []
if sys.flags.no_user_site:
cmd_args.append("-s")
cmd_args.extend(["-m", "site", *args])

with EnvironmentVarGuard() as env:
env["PYTHONUTF8"] = "1"
env["PYTHONIOENCODING"] = "utf-8"
proc = spawn_python(*args, text=True, env=env,
proc = spawn_python(*cmd_args, text=True, env=env,
encoding='utf-8', errors='replace')

output = kill_python(proc)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed a memory leak in :mod:`hmac` when it was using the hacl-star backend.
Discovered by ``@ashm-dev`` using AddressSanitizer.
Loading
Loading