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
5a4bbcd4
Unverified
Kaydet (Commit)
5a4bbcd4
authored
Eki 28, 2017
tarafından
Terry Jan Reedy
Kaydeden (comit)
GitHub
Eki 28, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-31836: Test_code_module now passes with sys.ps1, ps2 set (#4070)
üst
e86172d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
test_code_module.py
Lib/test/test_code_module.py
+8
-0
2017-10-21-15-41-53.bpo-31836.fheLME.rst
...NEWS.d/next/IDLE/2017-10-21-15-41-53.bpo-31836.fheLME.rst
+4
-0
No files found.
Lib/test/test_code_module.py
Dosyayı görüntüle @
5a4bbcd4
...
@@ -28,16 +28,24 @@ class TestInteractiveConsole(unittest.TestCase):
...
@@ -28,16 +28,24 @@ class TestInteractiveConsole(unittest.TestCase):
self
.
sysmod
=
stack
.
enter_context
(
prepatch
)
self
.
sysmod
=
stack
.
enter_context
(
prepatch
)
if
sys
.
excepthook
is
sys
.
__excepthook__
:
if
sys
.
excepthook
is
sys
.
__excepthook__
:
self
.
sysmod
.
excepthook
=
self
.
sysmod
.
__excepthook__
self
.
sysmod
.
excepthook
=
self
.
sysmod
.
__excepthook__
del
self
.
sysmod
.
ps1
del
self
.
sysmod
.
ps2
def
test_ps1
(
self
):
def
test_ps1
(
self
):
self
.
infunc
.
side_effect
=
EOFError
(
'Finished'
)
self
.
infunc
.
side_effect
=
EOFError
(
'Finished'
)
self
.
console
.
interact
()
self
.
console
.
interact
()
self
.
assertEqual
(
self
.
sysmod
.
ps1
,
'>>> '
)
self
.
assertEqual
(
self
.
sysmod
.
ps1
,
'>>> '
)
self
.
sysmod
.
ps1
=
'custom1> '
self
.
console
.
interact
()
self
.
assertEqual
(
self
.
sysmod
.
ps1
,
'custom1> '
)
def
test_ps2
(
self
):
def
test_ps2
(
self
):
self
.
infunc
.
side_effect
=
EOFError
(
'Finished'
)
self
.
infunc
.
side_effect
=
EOFError
(
'Finished'
)
self
.
console
.
interact
()
self
.
console
.
interact
()
self
.
assertEqual
(
self
.
sysmod
.
ps2
,
'... '
)
self
.
assertEqual
(
self
.
sysmod
.
ps2
,
'... '
)
self
.
sysmod
.
ps1
=
'custom2> '
self
.
console
.
interact
()
self
.
assertEqual
(
self
.
sysmod
.
ps1
,
'custom2> '
)
def
test_console_stderr
(
self
):
def
test_console_stderr
(
self
):
self
.
infunc
.
side_effect
=
[
"'antioch'"
,
""
,
EOFError
(
'Finished'
)]
self
.
infunc
.
side_effect
=
[
"'antioch'"
,
""
,
EOFError
(
'Finished'
)]
...
...
Misc/NEWS.d/next/IDLE/2017-10-21-15-41-53.bpo-31836.fheLME.rst
0 → 100644
Dosyayı görüntüle @
5a4bbcd4
Test_code_module now passes if run after test_idle, which sets ps1.
The code module uses sys.ps1 if present or sets it to '>>> ' if not.
Test_code_module now properly tests both behaviors. Ditto for ps2.
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