test: don't depend on the way test is started

authorSylvain Thénault <sylvain.thenault@logilab.fr>
changesetb763bb212ddd
branchdefault
phasepublic
hiddenno
parent revision#3bda127e6db7 Added tag logilab-astng-debian-version-0.23.1-1 for changeset abf75e6ca8ae
child revision#0272006bdfbe use open rather than file as 2to3 miss it (probably because of the file class attribute)
files modified by this revision
test/unittest_scoped_nodes.py
# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1323362260 -3600
# Thu Dec 08 17:37:40 2011 +0100
# Node ID b763bb212ddd6df802ec09338f69abfd96917698
# Parent 3bda127e6db77dda6cf50d961f7858c57de097f4
test: don't depend on the way test is started

diff --git a/test/unittest_scoped_nodes.py b/test/unittest_scoped_nodes.py
@@ -267,11 +267,11 @@
1 
2      def test_lambda_qname(self):
3          astng = abuilder.string_build('''
4  lmbd = lambda: None
5  ''', __name__, __file__)
6 -        self.assertEqual('unittest_scoped_nodes.<lambda>', astng['lmbd'].parent.value.qname())
7 +        self.assertEqual('%s.<lambda>' % __name__, astng['lmbd'].parent.value.qname())
8 
9      def test_is_method(self):
10          data = '''
11  class A:
12      def meth1(self):