adaptations to execute tests successfully on Windows from the root dir
diff --git a/examples/tests/test_c-to-c.py b/examples/tests/test_c-to-c.py
index 2c3ddcc..995944a 100644
--- a/examples/tests/test_c-to-c.py
+++ b/examples/tests/test_c-to-c.py
@@ -3,9 +3,9 @@
import sys
import unittest
-sys.path.insert(0, '..') # for c-to-c.py
-sys.path.insert(0, '../..') # for pycparser libs
-sys.path.insert(0, 'examples') # for running from root dir
+# Run from the root dir
+sys.path.insert(0, '.')
+sys.path.insert(0, 'examples')
from pycparser import c_parser
c2cmodule = __import__('c-to-c')
diff --git a/tests/test_general.py b/tests/test_general.py
index afa4d5e..4b62002 100644
--- a/tests/test_general.py
+++ b/tests/test_general.py
@@ -28,9 +28,10 @@
self.failUnless(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=r'-Iutils/fake_libc_include')
+ cpp_args='-I%s' % c_files_path)
self.failUnless(isinstance(ast, c_ast.FileAST))
ast2 = parse_file(self._find_file('year.c'), use_cpp=True,