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
a7a0e1a0
Kaydet (Commit)
a7a0e1a0
authored
Ara 03, 2010
tarafından
Michael Foord
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Set test.regrtest.TEMPDIR correctly when run with 'python -m test'
üst
9efdccae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
__main__.py
Lib/test/__main__.py
+4
-2
No files found.
Lib/test/__main__.py
Dosyayı görüntüle @
a7a0e1a0
...
...
@@ -3,7 +3,7 @@ import sys
import
sysconfig
from
test
import
support
from
test
.regrtest
import
main
from
test
import
regrtest
# findtestdir() gets the dirname out of __file__, so we have to make it
# absolute before changing the working directory.
...
...
@@ -22,6 +22,7 @@ if sysconfig.is_python_build():
TEMPDIR
=
os
.
path
.
abspath
(
TEMPDIR
)
if
not
os
.
path
.
exists
(
TEMPDIR
):
os
.
mkdir
(
TEMPDIR
)
regrtest
.
TEMPDIR
=
TEMPDIR
# Define a writable temp dir that will be used as cwd while running
# the tests. The name of the dir includes the pid to allow parallel
...
...
@@ -29,10 +30,11 @@ if sysconfig.is_python_build():
TESTCWD
=
'test_python_{}'
.
format
(
os
.
getpid
())
TESTCWD
=
os
.
path
.
join
(
TEMPDIR
,
TESTCWD
)
regrtest
.
TESTCWD
=
TESTCWD
# Run the tests in a context manager that temporary changes the CWD to a
# temporary and writable directory. If it's not possible to create or
# change the CWD, the original CWD will be used. The original CWD is
# available from support.SAVEDCWD.
with
support
.
temp_cwd
(
TESTCWD
,
quiet
=
True
):
main
()
regrtest
.
main
()
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