Lines Matching full:path
100 def new_parser(self, path=''):
101 return config.IdleUserConfParser(path)
164 path = os.path.join(tdir, 'test.cfg')
165 parser = self.new_parser(path)
169 # Should save to path when config is not empty.
170 self.assertFalse(os.path.exists(path))
172 self.assertTrue(os.path.exists(path))
177 self.assertFalse(os.path.exists(path))
189 idle_dir = os.path.dirname(__file__)
191 idle_dir = os.path.abspath(sys.path[0])
193 config_path = os.path.join(idle_dir, '../config-%s.def' % ctype)
227 with mock.patch('os.path.expanduser', return_value='/home/foo'):
228 with mock.patch('os.path.exists', return_value=True):
232 with mock.patch('os.path.expanduser', return_value='~'):
239 with mock.patch('os.path.join', return_value='/path/not/exists'):
250 with mock.patch('os.path.expanduser', return_value='C:\\foo'):
251 with mock.patch('os.path.exists', return_value=True):
255 with mock.patch('os.path.expanduser', return_value='~'):
262 with mock.patch('os.path.join', return_value='/path/not/exists'):
273 with mock.patch('os.path.dirname', return_value=idle_dir):
286 # Check config path are correct
289 os.path.join(idle_dir, f'config-{cfg_type}.def'))
292 os.path.join(conf.userdir or '#', f'config-{cfg_type}.cfg'))
302 # Load all config from path