def test_expand_home_directories_expands_tildes(): flexmock(module.os.path).should_receive('expanduser').with_args('~/bar').and_return('/foo/bar') flexmock(module.os.path).should_receive('expanduser').with_args('baz').and_return('baz') paths = module._expand_home_directories(('~/bar', 'baz')) assert paths == ('/foo/bar', 'baz')
def test_expand_home_directories_considers_none_as_no_directories(): paths = module._expand_home_directories(None) assert paths == ()