示例#1
0
文件: check.py 项目: wudping/gtk-doc
 def test_get_variable_empty_file(self):
     with self.assertRaises(check.FileFormatError) as ctx:
         check.get_variable({}, [], 'foo')
     self.assertEqual(str(ctx.exception), 'foo')
示例#2
0
文件: check.py 项目: wudping/gtk-doc
 def test_get_variable_finds_in_file_with_whitespce(self):
     result = check.get_variable({}, ['foo = bar'], 'foo')
     self.assertEqual('bar', result)
示例#3
0
文件: check.py 项目: wudping/gtk-doc
 def test_get_variable_prefers_env(self):
     result = check.get_variable({'foo': 'bar'}, ['foo=baz'], 'foo')
     self.assertEqual('bar', result)
示例#4
0
文件: check.py 项目: GNOME/gtk-doc
 def test_get_variable_empty_file(self):
     with self.assertRaises(check.FileFormatError) as ctx:
         check.get_variable({}, [], 'foo')
     self.assertEqual(str(ctx.exception), 'foo')
示例#5
0
文件: check.py 项目: GNOME/gtk-doc
 def test_get_variable_finds_in_file_with_whitespce(self):
     result = check.get_variable({}, ['foo = bar'], 'foo')
     self.assertEqual('bar', result)
示例#6
0
文件: check.py 项目: GNOME/gtk-doc
 def test_get_variable_prefers_env(self):
     result = check.get_variable({'foo': 'bar'}, ['foo=baz'], 'foo')
     self.assertEqual('bar', result)