diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-12-27 20:53:29 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-12-27 20:53:29 (GMT) |
commit | 6f70fe804690bbfea9caefe1ba01029aa1abf0eb (patch) | |
tree | 8a6294137e99662ee92d634b0a2d9eb75ebc1c26 /Lib/test/test_long.py | |
parent | 33e05e7905c00f601e4d1fea9ec0df0b3b9cb39c (diff) | |
download | cpython-6f70fe804690bbfea9caefe1ba01029aa1abf0eb.zip cpython-6f70fe804690bbfea9caefe1ba01029aa1abf0eb.tar.gz cpython-6f70fe804690bbfea9caefe1ba01029aa1abf0eb.tar.bz2 |
Issue #16790: add some of the recent issue #16045 int tests to test_long.
This patch also provides a simple way to share tests going forward
between test_int and test_long.
Diffstat (limited to 'Lib/test/test_long.py')
-rw-r--r-- | Lib/test/test_long.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 58cfc3a..f0847e7 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -1,10 +1,11 @@ import unittest -from test import test_support import sys import random import math +from test import test_int, test_support + # Used for lazy formatting of failure messages class Frm(object): def __init__(self, format, *args): @@ -78,8 +79,9 @@ if test_support.have_unicode: (unichr(0x200), ValueError), ] +class LongTest(test_int.IntLongCommonTests, unittest.TestCase): -class LongTest(unittest.TestCase): + ntype = long # Get quasi-random long consisting of ndigits digits (in base BASE). # quasi == the most-significant digit will not be 0, and the number |