def test_sys_paths_directories(self):
     with extend_sys_path(str(self.directory)):
         paths = list(autoreload.sys_path_directories())
     self.assertIn(self.directory, paths)
 def test_sys_paths_non_existing(self):
     nonexistent_file = Path(self.directory.name) / 'does_not_exist'
     with extend_sys_path(str(nonexistent_file)):
         paths = list(autoreload.sys_path_directories())
     self.assertNotIn(nonexistent_file, paths)
     self.assertNotIn(nonexistent_file.parent, paths)
 def test_sys_paths_absolute(self):
     paths = list(autoreload.sys_path_directories())
     self.assertTrue(all(p.is_absolute() for p in paths))
 def test_sys_paths_with_directories(self):
     with extend_sys_path(str(self.file)):
         paths = list(autoreload.sys_path_directories())
     self.assertIn(self.file.parent, paths)
Exemple #5
0
 def test_sys_paths_directories(self):
     with extend_sys_path(str(self.directory)):
         paths = list(autoreload.sys_path_directories())
     self.assertIn(self.directory, paths)
Exemple #6
0
 def test_sys_paths_absolute(self):
     paths = list(autoreload.sys_path_directories())
     self.assertTrue(all(p.is_absolute() for p in paths))
Exemple #7
0
 def test_sys_paths_non_existing(self):
     nonexistent_file = Path(self.directory.name) / 'does_not_exist'
     with extend_sys_path(str(nonexistent_file)):
         paths = list(autoreload.sys_path_directories())
     self.assertNotIn(nonexistent_file, paths)
     self.assertNotIn(nonexistent_file.parent, paths)
Exemple #8
0
 def test_sys_paths_with_directories(self):
     with extend_sys_path(str(self.file)):
         paths = list(autoreload.sys_path_directories())
     self.assertIn(self.file.parent, paths)