Skip to content

Commit 7e71ff2

Browse files
committed
test use of ~ with --include-easyblocks
1 parent 5269f6f commit 7e71ff2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/framework/include.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ def test_include_easyblocks(self):
7171
])
7272
write_file(os.path.join(myeasyblocks, 'generic', 'mybar.py'), mybar_easyblock_txt)
7373

74+
# hijack $HOME to test expanding ~ in locations passed to include_easyblocks
75+
os.environ['HOME'] = myeasyblocks
76+
7477
# expand set of known easyblocks with our custom ones
75-
glob_paths = [os.path.join(myeasyblocks, '*'), os.path.join(myeasyblocks, '*/*.py')]
78+
glob_paths = [os.path.join('~', '*'), os.path.join(myeasyblocks, '*/*.py')]
7679
included_easyblocks_path = include_easyblocks(self.test_prefix, glob_paths)
7780

7881
expected_paths = ['__init__.py', 'easyblocks/__init__.py', 'easyblocks/myfoo.py',

0 commit comments

Comments
 (0)