def test_assert_dir_with_file(self): path = self.temp_path("a/b/c.txt") fsutil.create_file(path) with self.assertRaises(OSError): fsutil.assert_dir(path)
def test_assert_dir(self): path = self.temp_path("a/b/") with self.assertRaises(OSError): fsutil.assert_dir(path) fsutil.create_dir(path) fsutil.assert_dir(path)