Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add comments
Sort also imports.
  • Loading branch information
vstinner committed Sep 25, 2025
commit aac672c0a1aa631cf1e2491c78df10a3592fbf0d
8 changes: 4 additions & 4 deletions Lib/test/test_os/test_dirfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Tests for the posix *at functions.
"""

import posix
import errno
import os
import unittest
import time
import posix
import stat
import errno
import time
import unittest
from contextlib import contextmanager
from test import support
from test.support import os_helper
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_encoding.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test encodings: filename encoding, os.fsencode(), device_encoding(), etc.
"""

import codecs
import locale
import os
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_environ.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test the environment: os.environ, putenv(), etc.
"""

import os
import posix
import subprocess
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_fd.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test file descriptors: pipe(), set_blocking(), memfd_create(), eventfd, etc.
"""

import errno
import itertools
import os
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_file.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test files: open(), read(), pwritev(), truncate(), etc.
"""

import errno
import os
import posix
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_os/test_fspath.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import os
import types
import unittest
from test.support.os_helper import FakePath


Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_link.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test symbolic and hard links: os.link(), os.symlink(), etc.
"""

import os
import posix
import shutil
Expand Down
8 changes: 6 additions & 2 deletions Lib/test/test_os/test_macos_weaklink.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import unittest
"""
Test macOS weak linking.
"""

import os
import sys
import posix
import sys
import unittest
from test.support import os_helper


Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_os/test_process.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Tests on processes: spawn(), exec(), fork(), waitpid(), etc.
Tests processes: spawn(), exec(), fork(), waitpid(), etc.
"""

import contextlib
import errno
import os
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_random.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test random bytes: getrandom(), urandom(), etc.
"""

import errno
import os
import resource
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_scandir.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test os.scandir() and os.DirEntry.
"""

import os
import stat
import sys
Expand Down
12 changes: 8 additions & 4 deletions Lib/test/test_os/test_sendfile.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import socket
import unittest
import os
"""
Test os.sendfile().
"""

import asyncio
import errno
import os
import socket
import sys
import asyncio
import unittest
from test.support import os_helper
from test.support import socket_helper
from .utils import create_file
Expand Down
10 changes: 7 additions & 3 deletions Lib/test/test_os/test_stat.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
"""
Test os.stat(), os.fstat(), etc.
"""

import errno
import os
import pickle
import posix
import stat
import unittest
import pickle
import sys
import subprocess
import sys
import unittest
from test.support import os_helper
from .utils import create_file

Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_os/test_terminal.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
Test the terminal: os.get_terminal_size(), os.openpty().
Test the terminal: os.get_terminal_size(), os.openpty(), etc.
"""

import errno
import os
import unittest
import subprocess
import errno
import sys
import textwrap
import unittest
from test import support
from test.support import os_helper
from test.support import warnings_helper
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_timerfd.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test the timerfd API.
"""

import errno
import os
import select
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_user.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test user functions: getuid(), setgid(), getgroups(), getlogin(), etc.
"""

import errno
import os
import posix
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_os/test_utime.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test the os.utime() function.
"""

import decimal
import fractions
import os
Expand Down
6 changes: 5 additions & 1 deletion Lib/test/test_os/test_windows.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Test Windows functions.
"""

import sys
import unittest

Expand All @@ -14,11 +18,11 @@
import textwrap
import time
import uuid
import _winapi
from test import support
from test.support import import_helper
from test.support import os_helper
from .utils import create_file
import _winapi


class FileTests(unittest.TestCase):
Expand Down
Loading