summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-08-25 02:59:59 +0000
committerBrett Cannon <bcannon@gmail.com>2006-08-25 02:59:59 +0000
commite741703c80b922b35fe65c68f643a8a823c076af (patch)
treeb5f56e06400f070213d428391a3017ab4e03242a /Lib/test
parent5f0dc878c8ec40d9e832dff3846bb5fd0456b62f (diff)
downloadcpython-e741703c80b922b35fe65c68f643a8a823c076af.tar.gz
Remove usage of backticks.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/list_tests.py2
-rw-r--r--Lib/test/test_doctest.py2
-rw-r--r--Lib/test/test_grammar.py4
-rw-r--r--Lib/test/test_mutants.py2
-rw-r--r--Lib/test/test_site.py2
-rw-r--r--Lib/test/test_userdict.py2
-rw-r--r--Lib/test/test_weakref.py4
-rw-r--r--Lib/test/tokenize_tests.txt2
8 files changed, 9 insertions, 11 deletions
diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py
index 14b54c7735..453c51c8a7 100644
--- a/Lib/test/list_tests.py
+++ b/Lib/test/list_tests.py
@@ -37,7 +37,7 @@ class CommonTest(seq_tests.CommonTest):
self.assertEqual(str(a0), str(l0))
self.assertEqual(repr(a0), repr(l0))
- self.assertEqual(`a2`, `l2`)
+ self.assertEqual(repr(a2), repr(l2))
self.assertEqual(str(a2), "[0, 1, 2]")
self.assertEqual(repr(a2), "[0, 1, 2]")
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index e8379c5dc4..12d75dd204 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -605,7 +605,7 @@ text:
... if isinstance(piece, doctest.Example):
... print 'Example:', (piece.source, piece.want, piece.lineno)
... else:
- ... print ' Text:', `piece`
+ ... print ' Text:', repr(piece)
Text: '\n'
Example: ('x, y = 2, 3 # no output expected\n', '', 1)
Text: ''
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 0ce43dc6f0..331d52762f 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -685,7 +685,7 @@ print L
print 'atoms'
-### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING
+### atom: '(' [testlist] ')' | '[' [testlist] ']' | '{' [dictmaker] '}' | NAME | NUMBER | STRING
### dictmaker: test ':' test (',' test ':' test)* [',']
x = (1)
@@ -706,8 +706,6 @@ x = {'one': 1, 'two': 2}
x = {'one': 1, 'two': 2,}
x = {'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6}
-x = `x`
-x = `1 or 2 or 3`
x = x
x = 'x'
x = 123
diff --git a/Lib/test/test_mutants.py b/Lib/test/test_mutants.py
index 7fc9ba3a1b..8afda75f48 100644
--- a/Lib/test/test_mutants.py
+++ b/Lib/test/test_mutants.py
@@ -209,7 +209,7 @@ class Machiavelli:
# Tim sez: "luck of the draw; crashes with or without for me."
print >> f
- return `"machiavelli"`
+ return repr("machiavelli")
def __hash__(self):
return 0
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 05a4ac4501..d379ab5c21 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -164,7 +164,7 @@ class ImportSideEffectTests(unittest.TestCase):
site.abs__file__()
for module in (sys, os, __builtin__):
try:
- self.failUnless(os.path.isabs(module.__file__), `module`)
+ self.failUnless(os.path.isabs(module.__file__), repr(module))
except AttributeError:
continue
# We could try everything in sys.modules; however, when regrtest.py
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py
index bc45bf3e9b..447f434db0 100644
--- a/Lib/test/test_userdict.py
+++ b/Lib/test/test_userdict.py
@@ -46,7 +46,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
# Test __repr__
self.assertEqual(str(u0), str(d0))
self.assertEqual(repr(u1), repr(d1))
- self.assertEqual(`u2`, `d2`)
+ self.assertEqual(repr(u2), repr(d2))
# Test __cmp__ and __len__
all = [d0, d1, d2, u, u0, u1, u2, uu, uu0, uu1, uu2]
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index f5114b26ce..1165980c65 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -51,10 +51,10 @@ class ReferencesTestCase(TestBase):
# Live reference:
o = C()
wr = weakref.ref(o)
- `wr`
+ repr(wr)
# Dead reference:
del o
- `wr`
+ repr(wr)
def test_basic_callback(self):
self.check_basic_callback(C)
diff --git a/Lib/test/tokenize_tests.txt b/Lib/test/tokenize_tests.txt
index 59e51d7c92..1facfc1905 100644
--- a/Lib/test/tokenize_tests.txt
+++ b/Lib/test/tokenize_tests.txt
@@ -21,7 +21,7 @@ y = [3, 4,
5]
z = {'a':5,
'b':6}
-x = (len(`y`) + 5*x - a[
+x = (len(repr(y)) + 5*x - a[
3 ]
- x + len({
}