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