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
da43ee43
Kaydet (Commit)
da43ee43
authored
Kas 22, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #25694: Fix test_regrtest for installed Python
üst
dc096555
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
test_regrtest.py
Lib/test/test_regrtest.py
+15
-5
No files found.
Lib/test/test_regrtest.py
Dosyayı görüntüle @
da43ee43
...
...
@@ -14,6 +14,7 @@ import platform
import
re
import
subprocess
import
sys
import
sysconfig
import
textwrap
import
unittest
from
test
import
libregrtest
...
...
@@ -306,7 +307,7 @@ class BaseTestCase(unittest.TestCase):
TESTNAME_REGEX
=
r'test_[a-z0-9_]+'
def
setUp
(
self
):
self
.
testdir
=
os
.
path
.
join
(
ROOT_DIR
,
'Lib'
,
'test'
)
self
.
testdir
=
os
.
path
.
realpath
(
os
.
path
.
dirname
(
__file__
)
)
# When test_regrtest is interrupted by CTRL+c, it can leave
# temporary test files
...
...
@@ -330,8 +331,13 @@ class BaseTestCase(unittest.TestCase):
self
.
addCleanup
(
support
.
unlink
,
path
)
# Use 'x' mode to ensure that we do not override existing tests
with
open
(
path
,
'x'
,
encoding
=
'utf-8'
)
as
fp
:
fp
.
write
(
code
)
try
:
with
open
(
path
,
'x'
,
encoding
=
'utf-8'
)
as
fp
:
fp
.
write
(
code
)
except
PermissionError
as
exc
:
if
not
sysconfig
.
is_python_build
():
self
.
skipTest
(
"cannot write
%
s:
%
s"
%
(
path
,
exc
))
raise
return
name
def
regex_search
(
self
,
regex
,
output
):
...
...
@@ -471,7 +477,7 @@ class ProgramsTestCase(BaseTestCase):
def
test_script_regrtest
(
self
):
# Lib/test/regrtest.py
script
=
os
.
path
.
join
(
ROOT_DIR
,
'Lib'
,
'test'
,
'regrtest.py'
)
script
=
os
.
path
.
join
(
self
.
testdir
,
'regrtest.py'
)
args
=
[
*
self
.
python_args
,
script
,
*
self
.
regrtest_args
,
*
self
.
tests
]
self
.
run_tests
(
args
)
...
...
@@ -503,10 +509,12 @@ class ProgramsTestCase(BaseTestCase):
def
test_script_autotest
(
self
):
# Lib/test/autotest.py
script
=
os
.
path
.
join
(
ROOT_DIR
,
'Lib'
,
'test'
,
'autotest.py'
)
script
=
os
.
path
.
join
(
self
.
testdir
,
'autotest.py'
)
args
=
[
*
self
.
python_args
,
script
,
*
self
.
regrtest_args
,
*
self
.
tests
]
self
.
run_tests
(
args
)
@unittest.skipUnless
(
sysconfig
.
is_python_build
(),
'run_tests.py script is not installed'
)
def
test_tools_script_run_tests
(
self
):
# Tools/scripts/run_tests.py
script
=
os
.
path
.
join
(
ROOT_DIR
,
'Tools'
,
'scripts'
,
'run_tests.py'
)
...
...
@@ -516,6 +524,8 @@ class ProgramsTestCase(BaseTestCase):
proc
=
self
.
run_command
(
args
)
self
.
check_output
(
proc
.
stdout
)
@unittest.skipUnless
(
sysconfig
.
is_python_build
(),
'test.bat script is not installed'
)
@unittest.skipUnless
(
sys
.
platform
==
'win32'
,
'Windows only'
)
def
test_tools_buildbot_test
(
self
):
# Tools\buildbot\test.bat
...
...
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