diff options
author | gbrandl <devnull@localhost> | 2007-04-25 17:06:07 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2007-04-25 17:06:07 +0200 |
commit | 41139bf9c8fdbe85cb27ec44abccd188b15ca6a8 (patch) | |
tree | d96b74ec8a274b3646b6fd2cd547f940c377f658 /tests/test_util.py | |
parent | 1b68b4671ab60608e2d308b0372b0629b3783360 (diff) | |
download | pygments-41139bf9c8fdbe85cb27ec44abccd188b15ca6a8.tar.gz |
[svn] Make mapfiles, make check, add D test file, make reindent.
Diffstat (limited to 'tests/test_util.py')
-rw-r--r-- | tests/test_util.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index 737a40f4..4ea30400 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -18,7 +18,7 @@ class UtilTest(unittest.TestCase): def test_getoptions(self): raises = self.assertRaises equals = self.assertEquals - + equals(util.get_bool_opt({}, 'a', True), True) equals(util.get_bool_opt({}, 'a', 1), True) equals(util.get_bool_opt({}, 'a', 'true'), True) @@ -39,14 +39,14 @@ class UtilTest(unittest.TestCase): def f1(): """ docstring headline - + other text """ def f2(): """ docstring headline - + other text """ @@ -58,14 +58,15 @@ class UtilTest(unittest.TestCase): def analyse(text): return 0.5 analyse = util.make_analysator(analyse) - self.assertEquals(X.analyse(''), 0.5) + self.assertEquals(X.analyse(''), 0.5) def test_shebang_matches(self): self.assert_(util.shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')) self.assert_(util.shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')) self.assert_(util.shebang_matches('#!/usr/bin/startsomethingwith python', r'python(2\.\d)?')) - self.assert_(util.shebang_matches('#!C:\\Python2.4\\Python.exe', r'python(2\.\d)?')) + self.assert_(util.shebang_matches('#!C:\\Python2.4\\Python.exe', + r'python(2\.\d)?')) self.failIf(util.shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')) self.failIf(util.shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')) @@ -84,6 +85,6 @@ class UtilTest(unittest.TestCase): '<?xml ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">')) self.assert_(util.looks_like_xml('<html xmlns>abc</html>')) self.failIf(util.looks_like_xml('<html>')) - + if __name__ == '__main__': unittest.main() |