summaryrefslogtreecommitdiffstats
path: root/pycparser-unittests-sys-path.patch
blob: e78697355559cc85a203c230987b9a558aeaaecb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# HG changeset patch
# User Scott Tsai <scottt.tw@gmail.com>
# Date 1358446261 -28800
# Node ID 12aa73c5da595a08f587c14a74e84bf72f0bf7a0
# Parent  a46039840b0ed8466bebcddae9d4f1df60d3bc98
tests/all_tests.py: add local paths to the front of sys.path

While doing pycparser development on a machine that already has an
older version of pycparser installed, we want unit tests to run against
the local copy instead of the system wide copy of pycparser.
This patch adds '.' and '..' to the front of sys.path instead of the back.

diff --git a/tests/all_tests.py b/tests/all_tests.py
--- a/tests/all_tests.py
+++ b/tests/all_tests.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 import sys
-sys.path.extend(['.', '..'])
+sys.path[0:0] = ['.', '..']
 
 import unittest