Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7297da8a
Commit
7297da8a
authored
Aug 31, 2004
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove test for mpz
parent
163f8000
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
89 deletions
+0
-89
Lib/test/test_mpz.py
Lib/test/test_mpz.py
+0
-89
No files found.
Lib/test/test_mpz.py
deleted
100644 → 0
View file @
163f8000
import
mpz
from
test.test_support
import
vereq
,
TestFailed
def
check_conversion
(
num
):
mpz_num
=
mpz
.
mpz
(
num
)
vereq
(
int
(
mpz_num
),
num
)
vereq
(
long
(
mpz_num
),
num
)
vereq
(
str
(
mpz_num
),
'mpz(%d)'
%
int
(
num
))
check_conversion
(
10
)
check_conversion
(
10L
)
# FIXME: should check strings, but I'm not sure it works, this seems odd:
# mpz.mpz('10') == mpz(12337)
vereq
(
mpz
.
divm
(
100
,
200
,
3
),
2
)
vereq
(
mpz
.
divm
(
100L
,
200
,
3
),
2
)
vereq
(
mpz
.
divm
(
100
,
200L
,
3
),
2
)
vereq
(
mpz
.
divm
(
100L
,
200L
,
3
),
2
)
vereq
(
mpz
.
gcd
(
100
,
200
),
100
)
vereq
(
mpz
.
gcd
(
100L
,
200
),
100
)
vereq
(
mpz
.
gcd
(
100
,
200L
),
100
)
vereq
(
mpz
.
gcd
(
100L
,
200L
),
100
)
vereq
(
mpz
.
gcdext
(
100
,
200
),
(
100
,
1
,
0
))
vereq
(
mpz
.
gcdext
(
100L
,
200
),
(
100
,
1
,
0
))
vereq
(
mpz
.
gcdext
(
100
,
200L
),
(
100
,
1
,
0
))
vereq
(
mpz
.
gcdext
(
100L
,
200L
),
(
100
,
1
,
0
))
vereq
(
mpz
.
powm
(
100
,
0
,
3
),
1
)
vereq
(
mpz
.
powm
(
100L
,
0
,
3
),
1
)
vereq
(
mpz
.
powm
(
100
,
0L
,
3
),
1
)
vereq
(
mpz
.
powm
(
100L
,
0L
,
3
),
1
)
vereq
(
mpz
.
powm
(
101
,
5
,
3333
),
1616
)
vereq
(
mpz
.
powm
(
101L
,
5
,
3333
),
1616
)
vereq
(
mpz
.
powm
(
101
,
5L
,
3333
),
1616
)
vereq
(
mpz
.
powm
(
101L
,
5L
,
3333
),
1616
)
vereq
(
mpz
.
sqrt
(
100
),
10
)
vereq
(
mpz
.
sqrt
(
100L
),
10
)
vereq
(
mpz
.
sqrt
(
200
),
14
)
vereq
(
mpz
.
sqrt
(
200L
),
14
)
vereq
(
mpz
.
sqrtrem
(
100
),
(
10
,
0
))
vereq
(
mpz
.
sqrtrem
(
100L
),
(
10
,
0
))
vereq
(
mpz
.
sqrtrem
(
200
),
(
14
,
4
))
vereq
(
mpz
.
sqrtrem
(
200L
),
(
14
,
4
))
try
:
mpz
.
mpz
(
10.
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'mpz(10.) should raise a TypeError'
try
:
mpz
.
powm
(
10.
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'powm(10.) should raise a TypeError'
try
:
mpz
.
powm
(
100
,
1
,
0
)
except
ValueError
:
pass
else
:
raise
TestFailed
,
'powm(100, 1, 0) should raise a ValueError'
try
:
mpz
.
divm
(
10
,
10
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'divm(10, 10) should raise a TypeError'
try
:
mpz
.
divm
(
10
,
10
,
10.
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'divm(10, 10, 10.) should raise a TypeError'
try
:
mpz
.
gcd
(
10
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'gcd(10) should raise a TypeError'
try
:
mpz
.
gcd
(
10
,
10.
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'gcd(10, 10.) should raise a TypeError'
try
:
mpz
.
gcdext
(
10
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'gcdext(10) should raise a TypeError'
try
:
mpz
.
gcdext
(
10
,
10.
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'gcdext(10, 10.) should raise a TypeError'
try
:
mpz
.
mpz
(
-
10
).
binary
()
except
ValueError
:
pass
else
:
raise
TestFailed
,
'mpz(-10).binary() should raise a ValueError'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment