Skip to content

Commit bf6c119

Browse files
committed
MAINT remove weird loop
1 parent 785213f commit bf6c119

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

openml/testing.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ def setUp(self):
1919
# cache
2020
self.static_cache_dir = None
2121
static_cache_dir = os.path.dirname(os.path.abspath(inspect.getfile(self.__class__)))
22-
for i in range(2):
23-
static_cache_dir = os.path.abspath(os.path.join(static_cache_dir,
24-
'..'))
25-
content = os.listdir(static_cache_dir)
26-
if 'files' in content:
27-
self.static_cache_dir = os.path.join(static_cache_dir, 'files')
22+
23+
static_cache_dir = os.path.abspath(os.path.join(static_cache_dir, '..'))
24+
content = os.listdir(static_cache_dir)
25+
if 'files' in content:
26+
self.static_cache_dir = os.path.join(static_cache_dir, 'files')
27+
2828
if self.static_cache_dir is None:
2929
raise ValueError('Cannot find test cache dir!')
3030

0 commit comments

Comments
 (0)