Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Aug 30, 2016
1 parent fc1ac19 commit f6c4822
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions doc/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ channels:
dependencies:
- python-autowig
- python-clanglite
- python-scons
- gitpython
- jupyter
- sphinx
- pip:
Expand Down
15 changes: 8 additions & 7 deletions test/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unittest
import sys
from path import path
import __builtin__

Expand Down Expand Up @@ -36,28 +37,28 @@ def setUpClass(cls):
autowig.parser.plugin = 'libclang'
autowig.generator.plugin = 'boost_python_internal'
cls.tgt = path('.').abspath()/'doc'/'examples'/'basic'/'src'/'py'
cls.src = path(sys.path).abspath()/'include'/'basic'
cls.src = path(sys.prefix).abspath()/'include'/'basic'

def test_mapping_export(self):
"""Test `mapping` export"""

for wrapper in self.src.walkfiles('wrapper_*.cpp'):
for wrapper in self.tgt.walkfiles('wrapper_*.cpp'):
wrapper.unlink()
wrapper = self.srcdir/'_module.h'
wrapper = self.tgt/'_module.h'
if wrapper.exists():
wrapper.unlink()
wrapper = self.srcdir/'_module.py'
wrapper = self.tgt/'_module.py'
if wrapper.exists():
wrapper.unlink()
wrapper = self.srcdir/'_module.cpp'
wrapper = self.tgt/'_module.cpp'
if wrapper.exists():
wrapper.unlink()

autowig.scons(cls.tgt.parent.parent, 'cpp')
autowig.scons(self.tgt.parent.parent, 'cpp')

asg = autowig.AbstractSemanticGraph()

asg = autowig.parser(asg, self.cppdir.files(*.h'),
asg = autowig.parser(asg, self.src.files('*.h'),
['-x', 'c++', '-std=c++11', '-I' + str(self.src)],
silent = True)

Expand Down

0 comments on commit f6c4822

Please sign in to comment.