| 212 | |
| 213 | @unittest.skipUnless(hasattr(os, 'chflags'), 'test needs os.chflags()') |
| 214 | def test_addsitedir_hidden_flags(self): |
| 215 | pth_file = PthFile() |
| 216 | pth_file.cleanup(prep=True) |
| 217 | try: |
| 218 | pth_file.create() |
| 219 | st = os.stat(pth_file.file_path) |
| 220 | os.chflags(pth_file.file_path, st.st_flags | stat.UF_HIDDEN) |
| 221 | site.addsitedir(pth_file.base_dir, set()) |
| 222 | self.assertNotIn(site.makepath(pth_file.good_dir_path)[0], sys.path) |
| 223 | self.assertIn(pth_file.base_dir, sys.path) |
| 224 | finally: |
| 225 | pth_file.cleanup() |
| 226 | |
| 227 | @unittest.skipUnless(sys.platform == 'win32', 'test needs Windows') |
| 228 | @support.requires_subprocess() |