def test_format_str_with_homedir(self): c = "~/foo" assert format_str(c, {}) == os.path.expanduser('~/foo')
def test_format_str_handles_bool(self): # If command is false/true in yaml file, it gets coverted to False/True # which is bool object. format should handle this. assert format_str(True, {}) == 'true' assert format_str(False, {}) == 'false'
def test_format_str_preserves_whitespace(self): c = " eggs spam beans " assert format_str(c, {}) == c
def test_format_str(self, comm, arg_dict, result): arg_dict['__files__'] = [self.files] arg_dict['__files_dir__'] = [self.files_dir] assert format_str(comm, arg_dict) == result