Skip to content

Commit 5a2a6de

Browse files
author
joeljonsson
committed
update to pythonTest
1 parent dfb9daf commit 5a2a6de

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

test/pythonTest.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,16 @@
22
import os, sys
33
myPath = os.path.dirname(os.path.abspath(__file__))
44

5-
# Add path to location of the python APR module (your build folder)
6-
#sys.path.insert(0, "../cmake-build-release")
5+
# The test is run from the build folder, which is where the pyApr module is located
6+
sys.path.insert(0, os.getcwd())
7+
import pyApr
78

89
# Check if APR can be read and if gives correct dimensions
910
#import pyApr
1011
import numpy as np
11-
import fnmatch
1212

1313

1414
def main():
15-
"""
16-
If you get ImportErrors, or if you have more than one build containing a file pyApr.so, you may want to
17-
manually supply the path by changing the block below to
18-
sys.path.insert(0, '/path/to/dir/containing/module/')
19-
"""
20-
# -------------------------------------------------- #
21-
print("Searching for pyApr module...")
22-
basePath = os.path.join(myPath, os.pardir)
23-
for root, dirnames, filenames in os.walk(basePath):
24-
if fnmatch.filter(filenames, 'pyApr.so'):
25-
sys.path.insert(0, root)
26-
print('pyApr module found in {}'.format(root))
27-
# -------------------------------------------------- #
28-
29-
import pyApr
3015

3116
successes = 0
3217

0 commit comments

Comments
 (0)