summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-06-10 23:52:59 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-06-10 23:52:59 (GMT)
commitc533edceb1c028f7af8cd6fea3962316e24a562a (patch)
tree479be02061cb9641d6cdc315d361422e0b6ab6cd /Lib
parent7b9542a3f747787aedf056ddaef99e4469777aa9 (diff)
downloadcpython-c533edceb1c028f7af8cd6fea3962316e24a562a.zip
cpython-c533edceb1c028f7af8cd6fea3962316e24a562a.tar.gz
cpython-c533edceb1c028f7af8cd6fea3962316e24a562a.tar.bz2
Renamed some stuff to tell the truth about what it does.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_struct.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index ebd6e45..c977913 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -128,7 +128,7 @@ simple_err(struct.pack, "Q", -1) # can't pack -1 as unsigned regardless
simple_err(struct.pack, "q", "a") # can't pack string as 'q' regardless
simple_err(struct.pack, "Q", "a") # ditto, but 'Q'
-def force_bigendian(value):
+def bigendian_to_native(value):
if isbigendian:
return value
chars = list(value)
@@ -148,10 +148,10 @@ if has_native_qQ:
('Q', (1L << (8*bytes))-1, '\xff' * bytes),
('q', (1L << (8*bytes-1))-1, '\x7f' + '\xff' * (bytes - 1))):
got = struct.pack(format, input)
- bigexpected = force_bigendian(expected)
- verify(got == bigexpected,
+ native_expected = bigendian_to_native(expected)
+ verify(got == native_expected,
"%r-pack of %r gave %r, not %r" %
- (format, input, got, bigexpected))
+ (format, input, got, native_expected))
retrieved = struct.unpack(format, got)[0]
verify(retrieved == input,
"%r-unpack of %r gave %r, not %r" %