Lines Matching defs:test
18 from test import support
19 from test.support import os_helper
20 from test.support import script_helper
21 from test.support import warnings_helper
34 # This is organized as one test for each chunk of code in tempfile.py,
268 # We test _get_default_tempdir some more by testing gettempdir.
290 # test again with failing os.open()
296 # test again with failing os.write()
483 # effect. The core of this test is therefore in
706 fd, path = tempfile.mkstemp(prefix='test-temp-')
810 # is running the test.
870 path = tempfile.mkdtemp(prefix='test-mkdtemp-')
939 # We test _TemporaryFileWrapper by testing NamedTemporaryFile.
1071 # How to test the mode and bufsize parameters?
1431 # How to test the mode and bufsize parameters?
1514 with open(os.path.join(path, "test%d.txt" % i), "wb") as f:
1596 def test(target, target_is_directory):
1614 test('nonexisting', target_is_directory=False)
1616 test('nonexisting', target_is_directory=True)
1621 test(file1, target_is_directory=False)
1629 test(dir1, target_is_directory=True)
1646 def test(target, target_is_directory):
1664 test('nonexisting', target_is_directory=False)
1666 test('nonexisting', target_is_directory=True)
1671 test(file1, target_is_directory=False)
1678 test(dir1, target_is_directory=True)
1855 # skip the test if these flags are not supported (ex: FreeBSD 13)