示例#1
0
 def test_format_str_with_homedir(self):
     c = "~/foo"
     assert format_str(c, {}) == os.path.expanduser('~/foo')
示例#2
0
 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'
示例#3
0
 def test_format_str_preserves_whitespace(self):
     c = "  eggs   spam    beans  "
     assert format_str(c, {}) == c
示例#4
0
 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
示例#5
0
 def test_format_str_with_homedir(self):
     c = "~/foo"
     assert format_str(c, {}) == os.path.expanduser('~/foo')
示例#6
0
 def test_format_str_preserves_whitespace(self):
     c = "  eggs   spam    beans  "
     assert format_str(c, {}) == c
示例#7
0
 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'
示例#8
0
 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