Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/statiskit/AutoWIG into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Oct 27, 2017
2 parents 72de71e + 3bd8ee3 commit 19cf17b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/py/autowig/asg.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def parent(self):
"""
if self._node == os.path.abspath(os.sep):
return None
elif self._node in ["/", "\\"]:
return None
else:
return self._asg[self.globalname[:len(self.globalname)-len(self.localname)]]

Expand Down
13 changes: 10 additions & 3 deletions test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def setUpClass(cls):
cls.scons = subprocess.check_output(['where', 'scons.bat']).strip()
else:
cls.scons = subprocess.check_output(['which', 'scons']).strip()
if six.PY3:
cls.scons = cls.scons.decode("ascii", "ignore")
subprocess.check_output([cls.scons, 'cpp', '--prefix=' + str(cls.prefix)],
cwd=cls.srcdir)
cls.incdir = cls.prefix/'include'/'basic'
Expand All @@ -45,9 +47,14 @@ def test_mapping_export(self):

asg = autowig.AbstractSemanticGraph()

if autowig.parser.plugin == 'libclang':
kwargs = dict(silent = True)
else:
kwargs = dict()

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

autowig.controller.plugin = 'default'
autowig.controller(asg)
Expand All @@ -64,7 +71,7 @@ def test_mapping_export(self):
if filepath.exists() and filepath.ext in ['.cpp', '.h']:
filepath.remove()

@attr(osx=False)
@attr(win=False)
def test_pyclanglite_parser(self):
"""Test `pyclanglite` parser"""
plugin = autowig.parser.plugin
Expand Down

0 comments on commit 19cf17b

Please sign in to comment.