The Windows buildbots seem to be unable to agree whether they need them or not.
# existing file
tmpdir = self.mkdtemp()
- self.write_file((tmpdir, "tstfile"), "")
+ write_file((tmpdir, "tstfile"), "")
filename = os.path.join(tmpdir, "tstfile")
- with self.assertRaises(OSError) as cm:
+ with self.assertRaises(NotADirectoryError) as cm:
shutil.rmtree(filename)
- if os.name == 'nt':
+ if cm.exception.filename.endswith('*.*'):
rm_name = os.path.join(filename, '*.*')
else:
rm_name = filename