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
d3113740
Kaydet (Commit)
d3113740
authored
Şub 27, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
Patch by Mikhail Novikov.
üst
2201ecbb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
test_parser.py
Lib/lib2to3/tests/test_parser.py
+10
-3
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/lib2to3/tests/test_parser.py
Dosyayı görüntüle @
d3113740
...
@@ -11,10 +11,14 @@ from __future__ import with_statement
...
@@ -11,10 +11,14 @@ from __future__ import with_statement
# Testing imports
# Testing imports
from
.
import
support
from
.
import
support
from
.support
import
driver
,
test_dir
from
.support
import
driver
,
test_dir
from
test.support
import
verbose
# Python imports
# Python imports
import
os
import
os
import
sys
import
unittest
import
unittest
import
warnings
import
subprocess
# Local imports
# Local imports
from
lib2to3.pgen2
import
tokenize
from
lib2to3.pgen2
import
tokenize
...
@@ -171,10 +175,12 @@ class TestParserIdempotency(support.TestCase):
...
@@ -171,10 +175,12 @@ class TestParserIdempotency(support.TestCase):
try
:
try
:
tree
=
driver
.
parse_string
(
source
)
tree
=
driver
.
parse_string
(
source
)
except
ParseError
as
err
:
except
ParseError
as
err
:
print
(
'ParseError on file'
,
filepath
,
err
)
if
verbose
>
0
:
warnings
.
warn
(
'ParseError on file
%
s (
%
s)'
%
(
filepath
,
err
))
continue
continue
new
=
str
(
tree
)
new
=
str
(
tree
)
if
diff
(
filepath
,
new
):
x
=
diff
(
filepath
,
new
)
if
x
:
self
.
fail
(
"Idempotency failed:
%
s"
%
filepath
)
self
.
fail
(
"Idempotency failed:
%
s"
%
filepath
)
def
test_extended_unpacking
(
self
):
def
test_extended_unpacking
(
self
):
...
@@ -183,6 +189,7 @@ class TestParserIdempotency(support.TestCase):
...
@@ -183,6 +189,7 @@ class TestParserIdempotency(support.TestCase):
driver
.
parse_string
(
"(z, *y, w) = m
\n
"
)
driver
.
parse_string
(
"(z, *y, w) = m
\n
"
)
driver
.
parse_string
(
"for *z, m in d: pass
\n
"
)
driver
.
parse_string
(
"for *z, m in d: pass
\n
"
)
class
TestLiterals
(
GrammarTest
):
class
TestLiterals
(
GrammarTest
):
def
validate
(
self
,
s
):
def
validate
(
self
,
s
):
...
@@ -221,7 +228,7 @@ def diff(fn, result):
...
@@ -221,7 +228,7 @@ def diff(fn, result):
with
open
(
'@'
,
'w'
)
as
f
:
with
open
(
'@'
,
'w'
)
as
f
:
f
.
write
(
str
(
result
))
f
.
write
(
str
(
result
))
fn
=
fn
.
replace
(
'"'
,
'
\\
"'
)
fn
=
fn
.
replace
(
'"'
,
'
\\
"'
)
return
os
.
system
(
'diff -u "
%
s" @'
%
fn
)
return
subprocess
.
call
([
'diff'
,
'-u'
,
fn
,
'@'
],
stdout
=
(
subprocess
.
DEVNULL
if
verbose
<
1
else
None
)
)
finally
:
finally
:
try
:
try
:
os
.
remove
(
"@"
)
os
.
remove
(
"@"
)
...
...
Misc/ACKS
Dosyayı görüntüle @
d3113740
...
@@ -665,6 +665,7 @@ Stefan Norberg
...
@@ -665,6 +665,7 @@ Stefan Norberg
Tim Northover
Tim Northover
Joe Norton
Joe Norton
Neal Norwitz
Neal Norwitz
Mikhail Novikov
Michal Nowikowski
Michal Nowikowski
Steffen Daode Nurpmeso
Steffen Daode Nurpmeso
Nigel O'Brian
Nigel O'Brian
...
...
Misc/NEWS
Dosyayı görüntüle @
d3113740
...
@@ -127,6 +127,9 @@ Core and Builtins
...
@@ -127,6 +127,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
Patch by Mikhail Novikov.
- Issue #13447: Add a test file to host regression tests for bugs in the
- Issue #13447: Add a test file to host regression tests for bugs in the
scripts found in the Tools directory.
scripts found in the Tools directory.
...
...
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