summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-08-10 08:07:39 +0300
committerEli Bendersky <eliben@gmail.com>2012-08-10 08:07:39 +0300
commitc4701a30409e6850cb36324aed5125e4608eef57 (patch)
treea05dd046d6d195962abd76def6869e3ed1330ca3 /tests
parent0373cbe671fc1fcbd4c376309c2e51454f86688a (diff)
downloadpycparser-c4701a30409e6850cb36324aed5125e4608eef57.tar.gz
failing test for windows
Diffstat (limited to 'tests')
-rw-r--r--tests/test_general.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/test_general.py b/tests/test_general.py
index 087681a..9e64a28 100644
--- a/tests/test_general.py
+++ b/tests/test_general.py
@@ -25,14 +25,14 @@ class TestParsing(unittest.TestCase):
def test_without_cpp(self):
ast = parse_file(self._find_file('example_c_file.c'))
- self.failUnless(isinstance(ast, c_ast.FileAST))
+ self.assertTrue(isinstance(ast, c_ast.FileAST))
def test_with_cpp(self):
c_files_path = os.path.join('tests', 'c_files')
ast = parse_file(self._find_file('memmgr.c'), use_cpp=True,
cpp_path=CPPPATH,
cpp_args='-I%s' % c_files_path)
- self.failUnless(isinstance(ast, c_ast.FileAST))
+ self.assertTrue(isinstance(ast, c_ast.FileAST))
ast2 = parse_file(self._find_file('year.c'), use_cpp=True,
cpp_path=CPPPATH,
@@ -40,12 +40,19 @@ class TestParsing(unittest.TestCase):
r'-Iutils/fake_libc_include',
r'-I../utils/fake_libc_include'])
- self.failUnless(isinstance(ast2, c_ast.FileAST))
+ self.assertTrue(isinstance(ast2, c_ast.FileAST))
+
+ def test_cpp_funkydir(self):
+ c_files_path = os.path.join('tests', 'c_files')
+ ast = parse_file(self._find_file('simplemain.c'), use_cpp=True,
+ cpp_path=CPPPATH, cpp_args='-I%s' % c_files_path)
+ self.assertTrue(isinstance(ast, c_ast.FileAST))
def test_no_real_content_after_cpp(self):
ast = parse_file(self._find_file('empty.h'), use_cpp=True,
cpp_path=CPPPATH)
- self.failUnless(isinstance(ast, c_ast.FileAST))
+ self.assertTrue(isinstance(ast, c_ast.FileAST))
+
if __name__ == '__main__':
unittest.main()