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
5d032c0f
Kaydet (Commit)
5d032c0f
authored
Kas 17, 2011
tarafından
Jason R. Coombs
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
PDB now will properly escape backslashes in the names of modules it executes. Fixes #7750
üst
9efddb65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
pdb.py
Lib/pdb.py
+1
-1
test_pdb.py
Lib/test/test_pdb.py
+27
-0
No files found.
Lib/pdb.py
Dosyayı görüntüle @
5d032c0f
...
@@ -1229,7 +1229,7 @@ see no sign that the breakpoint was reached.
...
@@ -1229,7 +1229,7 @@ see no sign that the breakpoint was reached.
self
.
_wait_for_mainpyfile
=
1
self
.
_wait_for_mainpyfile
=
1
self
.
mainpyfile
=
self
.
canonic
(
filename
)
self
.
mainpyfile
=
self
.
canonic
(
filename
)
self
.
_user_requested_quit
=
0
self
.
_user_requested_quit
=
0
statement
=
'execfile(
"
%
s"
)'
%
filename
statement
=
'execfile(
%
r
)'
%
filename
self
.
run
(
statement
)
self
.
run
(
statement
)
# Simplified interface
# Simplified interface
...
...
Lib/test/test_pdb.py
Dosyayı görüntüle @
5d032c0f
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
import
imp
import
imp
import
sys
import
sys
import
os
import
unittest
import
subprocess
from
test
import
test_support
from
test
import
test_support
# This little helper class is essential for testing pdb under doctest.
# This little helper class is essential for testing pdb under doctest.
...
@@ -277,6 +280,29 @@ def test_pdb_continue_in_bottomframe():
...
@@ -277,6 +280,29 @@ def test_pdb_continue_in_bottomframe():
4
4
"""
"""
class
Tester7750
(
unittest
.
TestCase
):
# if the filename has something that resolves to a python
# escape character (such as \t), it will fail
test_fn
=
'.
\\
test7750.py'
msg
=
"issue7750 only applies when os.sep is a backslash"
@unittest.skipUnless
(
os
.
path
.
sep
==
'
\\
'
,
msg
)
def
test_issue7750
(
self
):
with
open
(
self
.
test_fn
,
'w'
)
as
f
:
f
.
write
(
'print("hello world")'
)
cmd
=
[
sys
.
executable
,
'-m'
,
'pdb'
,
self
.
test_fn
,]
proc
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
,
)
stdout
,
stderr
=
proc
.
communicate
(
'quit
\n
'
)
self
.
assertNotIn
(
'IOError'
,
stdout
,
"pdb munged the filename"
)
def
tearDown
(
self
):
if
os
.
path
.
isfile
(
self
.
test_fn
):
os
.
remove
(
self
.
test_fn
)
def
test_main
():
def
test_main
():
from
test
import
test_pdb
from
test
import
test_pdb
...
@@ -285,3 +311,4 @@ def test_main():
...
@@ -285,3 +311,4 @@ def test_main():
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
test_main
()
test_main
()
unittest
.
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