Skip to content

Commit

Permalink
Forward-port fix for Collector #1656 from 2.7 branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Apr 5, 2005
1 parent 2e5e4f2 commit 3f8a7b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/testPythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ def testBadImports(self):
self.assertPSRaises(ImportError, body="import mmap")

def testAttributeAssignment(self):
# It's illegal to assign to attributes of anything except
# list or dict.
# It's illegal to assign to attributes of anything that
# doesn't has enabling security declared.
# Classes (and their instances) defined by restricted code
# are an exception -- they are fully readable and writable.
cases = [("import string", "string"),
("class Spam: pass", "Spam"),
("def f(): pass", "f"),
("class Spam: pass\nspam = Spam()", "spam"),
]
assigns = ["%s.splat = 'spam'",
"setattr(%s, '_getattr_', lambda x, y: True)",
Expand Down Expand Up @@ -236,7 +236,7 @@ def testGlobalIsDeclaration(self):

def test__name__(self):
f = self._filePS('class.__name__')
self.assertEqual(f(), ('?.foo', "'string'"))
self.assertEqual(f(), ("'foo'>", "'string'"))

def test_filepath(self):
# This test is meant to raise a deprecation warning.
Expand Down

0 comments on commit 3f8a7b9

Please sign in to comment.