summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py8
-rw-r--r--test/unittest_inference.py6
-rw-r--r--test/unittest_nodes.py16
-rw-r--r--test/unittest_scoped_nodes.py6
4 files changed, 12 insertions, 24 deletions
diff --git a/setup.py b/setup.py
index b8e600ef..f75de7f7 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,7 @@ sys.modules.pop('__pkginfo__', None)
__pkginfo__ = __import__("__pkginfo__")
# import required features
from __pkginfo__ import modname, version, license, description, \
- web, author, author_email
+ web, author, author_email
distname = getattr(__pkginfo__, 'distname', modname)
scripts = getattr(__pkginfo__, 'scripts', [])
@@ -137,7 +137,11 @@ class MyBuildPy(build_py):
dest = join(basedir, directory)
shutil.rmtree(dest, ignore_errors=True)
shutil.copytree(directory, dest)
-
+ if sys.version_info >= (3, 0):
+ # process manually python file in include_dirs (test data)
+ from subprocess import check_call
+ print('running 2to3 on', dest) # parens are NOT optional here for py3k compat
+ check_call(['2to3', '-wn', dest])
def install(**kwargs):
"""setup entry point"""
diff --git a/test/unittest_inference.py b/test/unittest_inference.py
index ab6896de..124ebcf8 100644
--- a/test/unittest_inference.py
+++ b/test/unittest_inference.py
@@ -1,5 +1,5 @@
-# copyright 2003-2010 Sylvain Thenault, all rights reserved.
-# contact mailto:thenault@gmail.com
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-astng.
#
@@ -937,7 +937,7 @@ def f(x):
infered = get_name_node(astng, 'string').infer().next()
self.assertIsInstance(infered, nodes.Module)
self.assertEqual(infered.name, 'string')
- self.failUnless('lower' in infered.locals)
+ self.failUnless('ascii_letters' in infered.locals)
def test_mechanize_open(self):
try:
diff --git a/test/unittest_nodes.py b/test/unittest_nodes.py
index 7eb9099c..d776789d 100644
--- a/test/unittest_nodes.py
+++ b/test/unittest_nodes.py
@@ -1,11 +1,5 @@
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Lesser General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
-# copyright 2003-2010 Sylvain Thenault, all rights reserved.
-# contact mailto:thenault@gmail.com
#
# This file is part of logilab-astng.
#
@@ -21,14 +15,6 @@
#
# You should have received a copy of the GNU Lesser General Public License along
# with logilab-astng. If not, see <http://www.gnu.org/licenses/>.
-
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""tests for specific behaviour of astng nodes
"""
import sys
diff --git a/test/unittest_scoped_nodes.py b/test/unittest_scoped_nodes.py
index 6e647566..3c763460 100644
--- a/test/unittest_scoped_nodes.py
+++ b/test/unittest_scoped_nodes.py
@@ -1,7 +1,5 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
-# copyright 2003-2010 Sylvain Thenault, all rights reserved.
-# contact mailto:thenault@gmail.com
#
# This file is part of logilab-astng.
#
@@ -622,7 +620,7 @@ class Past(Present):
@f(a=2,
b=3)
def g1(x):
- print x
+ print(x)
@f(a=2,
b=3)