diff -r 708beeb65026 Lib/test/test_os.py --- a/Lib/test/test_os.py Tue Mar 22 21:26:31 2016 +0100 +++ b/Lib/test/test_os.py Mon Mar 28 10:45:53 2016 -0600 @@ -2022,7 +2022,7 @@ assert not os.path.exists(self.junction) def tearDown(self): - if os.path.exists(self.junction): + if os.path.lexists(self.junction): # os.rmdir delegates to Windows' RemoveDirectoryW, # which removes junction points safely. os.rmdir(self.junction)