Skip to content

Commit 23de823

Browse files
committed
Add more tests
1 parent 2b28f27 commit 23de823

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_os/test_os.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4123,10 +4123,15 @@ def test_oserror_filename(self):
41234123

41244124
def test_mkdir(self):
41254125
filename = os_helper.TESTFN
4126+
subdir = os.path.join(filename, 'subdir')
4127+
self.assertRaises(FileNotFoundError, os.mkdir, subdir)
4128+
41264129
self.addCleanup(os_helper.unlink, filename)
41274130
create_file(filename)
41284131
self.assertRaises(FileExistsError, os.mkdir, filename)
41294132

4133+
self.assertRaises(NotADirectoryError, os.mkdir, subdir)
4134+
41304135

41314136
class CPUCountTests(unittest.TestCase):
41324137
def check_cpu_count(self, cpus):

0 commit comments

Comments
 (0)