summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_class.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-24 08:14:36 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-24 08:14:36 (GMT)
commitbcc0db82dc9cb474d56a4cc63748583232d9524f (patch)
tree0107d20b29b61fc7dfd9626ee7257242f8cf6302 /Lib/test/test_class.py
parented483ba63b9c03845386976bccff5d95df5b570a (diff)
downloadcpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.zip
cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.tar.gz
cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.tar.bz2
Get rid of remnants of integer division
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r--Lib/test/test_class.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index 92c220e..b8b4cab 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -11,8 +11,8 @@ testmeths = [
"rsub",
"mul",
"rmul",
- "div",
- "rdiv",
+ "truediv",
+ "rtruediv",
"mod",
"rmod",
"divmod",
@@ -134,16 +134,8 @@ testme - 1
testme * 1
1 * testme
-if 1/2 == 0:
- testme / 1
- 1 / testme
-else:
- # True division is in effect, so "/" doesn't map to __div__ etc; but
- # the canned expected-output file requires that __div__ etc get called.
- testme.__coerce__(1)
- testme.__div__(1)
- testme.__coerce__(1)
- testme.__rdiv__(1)
+testme / 1
+1 / testme
testme % 1
1 % testme