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
9caf9c04
Kaydet (Commit)
9caf9c04
authored
Şub 10, 2003
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add tests and news entry about parser errors from bug #678518.
üst
573e0334
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
test_parser.py
Lib/test/test_parser.py
+17
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/test_parser.py
Dosyayı görüntüle @
9caf9c04
...
@@ -134,6 +134,13 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
...
@@ -134,6 +134,13 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self
.
check_suite
(
"import sys as system, math"
)
self
.
check_suite
(
"import sys as system, math"
)
self
.
check_suite
(
"import sys, math as my_math"
)
self
.
check_suite
(
"import sys, math as my_math"
)
def
test_pep263
(
self
):
self
.
check_suite
(
"# -*- coding: iso-8859-1 -*-
\n
"
"pass
\n
"
)
def
test_assert
(
self
):
self
.
check_suite
(
"assert alo < ahi and blo < bhi
\n
"
)
#
#
# Second, we take *invalid* trees and make sure we get ParserError
# Second, we take *invalid* trees and make sure we get ParserError
# rejections for them.
# rejections for them.
...
@@ -355,6 +362,16 @@ class IllegalSyntaxTestCase(unittest.TestCase):
...
@@ -355,6 +362,16 @@ class IllegalSyntaxTestCase(unittest.TestCase):
(
0
,
''
))
(
0
,
''
))
self
.
check_bad_tree
(
tree
,
"a $= b"
)
self
.
check_bad_tree
(
tree
,
"a $= b"
)
def
test_malformed_global
(
self
):
#doesn't have global keyword in ast
tree
=
(
257
,
(
264
,
(
265
,
(
266
,
(
282
,
(
1
,
'foo'
))),
(
4
,
''
))),
(
4
,
''
),
(
0
,
''
))
self
.
check_bad_tree
(
tree
,
"malformed global ast"
)
def
test_main
():
def
test_main
():
loader
=
unittest
.
TestLoader
()
loader
=
unittest
.
TestLoader
()
...
...
Misc/NEWS
Dosyayı görüntüle @
9caf9c04
...
@@ -42,6 +42,8 @@ Core and builtins
...
@@ -42,6 +42,8 @@ Core and builtins
Extension modules
Extension modules
-----------------
-----------------
- Fix some bugs in the parser module. SF bug #678518.
- Thanks to Scott David Daniels, a subtle bug in how the zlib
- Thanks to Scott David Daniels, a subtle bug in how the zlib
extension implemented flush() was fixed. Scott also rewrote the
extension implemented flush() was fixed. Scott also rewrote the
zlib test suite using the unittest module. (SF bug #640230 and
zlib test suite using the unittest module. (SF bug #640230 and
...
...
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