Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
85746542
Kaydet (Commit)
85746542
authored
Eyl 04, 2016
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #27953: skip failing math and cmath tests for tan on OS X 10.4.
üst
96f774d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
test_cmath.py
Lib/test/test_cmath.py
+20
-0
test_math.py
Lib/test/test_math.py
+18
-1
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_cmath.py
Dosyayı görüntüle @
85746542
...
...
@@ -4,6 +4,8 @@ import test.test_math as test_math
import
unittest
import
cmath
,
math
from
cmath
import
phase
,
polar
,
rect
,
pi
import
platform
import
sys
import
sysconfig
INF
=
float
(
'inf'
)
...
...
@@ -332,6 +334,18 @@ class CMathTests(unittest.TestCase):
@requires_IEEE_754
def
test_specific_values
(
self
):
# Some tests need to be skipped on ancient OS X versions.
# See issue #27953.
SKIP_ON_TIGER
=
{
'tan0064'
}
osx_version
=
None
if
sys
.
platform
==
'darwin'
:
version_txt
=
platform
.
mac_ver
()[
0
]
try
:
osx_version
=
tuple
(
map
(
int
,
version_txt
.
split
(
'.'
)))
except
ValueError
:
pass
def
rect_complex
(
z
):
"""Wrapped version of rect that accepts a complex number instead of
two float arguments."""
...
...
@@ -345,6 +359,12 @@ class CMathTests(unittest.TestCase):
for
id
,
fn
,
ar
,
ai
,
er
,
ei
,
flags
in
parse_testfile
(
test_file
):
arg
=
complex
(
ar
,
ai
)
expected
=
complex
(
er
,
ei
)
# Skip certain tests on OS X 10.4.
if
osx_version
is
not
None
and
osx_version
<
(
10
,
5
):
if
id
in
SKIP_ON_TIGER
:
continue
if
fn
==
'rect'
:
function
=
rect_complex
elif
fn
==
'polar'
:
...
...
Lib/test/test_math.py
Dosyayı görüntüle @
85746542
...
...
@@ -6,8 +6,9 @@ from test import support
import
unittest
import
math
import
os
import
sys
import
platform
import
struct
import
sys
import
sysconfig
eps
=
1E-05
...
...
@@ -1150,6 +1151,18 @@ class MathTests(unittest.TestCase):
@requires_IEEE_754
def
test_testfile
(
self
):
# Some tests need to be skipped on ancient OS X versions.
# See issue #27953.
SKIP_ON_TIGER
=
{
'tan0064'
}
osx_version
=
None
if
sys
.
platform
==
'darwin'
:
version_txt
=
platform
.
mac_ver
()[
0
]
try
:
osx_version
=
tuple
(
map
(
int
,
version_txt
.
split
(
'.'
)))
except
ValueError
:
pass
fail_fmt
=
"{}: {}({!r}): {}"
failures
=
[]
...
...
@@ -1160,6 +1173,10 @@ class MathTests(unittest.TestCase):
if
fn
in
[
'rect'
,
'polar'
]:
# no real versions of rect, polar
continue
# Skip certain tests on OS X 10.4.
if
osx_version
is
not
None
and
osx_version
<
(
10
,
5
):
if
id
in
SKIP_ON_TIGER
:
continue
func
=
getattr
(
math
,
fn
)
...
...
Misc/NEWS
Dosyayı görüntüle @
85746542
...
...
@@ -135,6 +135,9 @@ Library
Tests
-----
- Issue #27953: Skip math and cmath tests that fail on OS X 10.4 due to a
poor libm implementation of tan.
- Issue #26040: Improve test_math and test_cmath coverage and rigour. Patch by
Jeff Allen.
...
...
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