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
1ed6be37
Kaydet (Commit)
1ed6be37
authored
Şub 27, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#17303: test_future* now work with unittest test discovery. Patch by Zachary Ware.
üst
c472c5d7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
19 deletions
+12
-19
test_future.py
Lib/test/test_future.py
+5
-7
test_future3.py
Lib/test/test_future3.py
+1
-5
test_future4.py
Lib/test/test_future4.py
+1
-5
test_future5.py
Lib/test/test_future5.py
+2
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_future.py
Dosyayı görüntüle @
1ed6be37
...
@@ -13,17 +13,17 @@ def get_error_location(msg):
...
@@ -13,17 +13,17 @@ def get_error_location(msg):
class
FutureTest
(
unittest
.
TestCase
):
class
FutureTest
(
unittest
.
TestCase
):
def
test_future1
(
self
):
def
test_future1
(
self
):
support
.
unload
(
'future_test1'
)
with
support
.
CleanImport
(
'future_test1'
):
from
test
import
future_test1
from
test
import
future_test1
self
.
assertEqual
(
future_test1
.
result
,
6
)
self
.
assertEqual
(
future_test1
.
result
,
6
)
def
test_future2
(
self
):
def
test_future2
(
self
):
support
.
unload
(
'future_test2'
)
with
support
.
CleanImport
(
'future_test2'
):
from
test
import
future_test2
from
test
import
future_test2
self
.
assertEqual
(
future_test2
.
result
,
6
)
self
.
assertEqual
(
future_test2
.
result
,
6
)
def
test_future3
(
self
):
def
test_future3
(
self
):
support
.
unload
(
'test_future3'
)
with
support
.
CleanImport
(
'test_future3'
):
from
test
import
test_future3
from
test
import
test_future3
def
test_badfuture3
(
self
):
def
test_badfuture3
(
self
):
...
@@ -103,7 +103,7 @@ class FutureTest(unittest.TestCase):
...
@@ -103,7 +103,7 @@ class FutureTest(unittest.TestCase):
self
.
fail
(
"syntax error didn't occur"
)
self
.
fail
(
"syntax error didn't occur"
)
def
test_multiple_features
(
self
):
def
test_multiple_features
(
self
):
support
.
unload
(
"test.test_future5"
)
with
support
.
CleanImport
(
"test.test_future5"
):
from
test
import
test_future5
from
test
import
test_future5
def
test_unicode_literals_exec
(
self
):
def
test_unicode_literals_exec
(
self
):
...
@@ -112,8 +112,6 @@ class FutureTest(unittest.TestCase):
...
@@ -112,8 +112,6 @@ class FutureTest(unittest.TestCase):
self
.
assertIsInstance
(
scope
[
"x"
],
str
)
self
.
assertIsInstance
(
scope
[
"x"
],
str
)
def
test_main
():
support
.
run_unittest
(
FutureTest
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Lib/test/test_future3.py
Dosyayı görüntüle @
1ed6be37
...
@@ -2,7 +2,6 @@ from __future__ import nested_scopes
...
@@ -2,7 +2,6 @@ from __future__ import nested_scopes
from
__future__
import
division
from
__future__
import
division
import
unittest
import
unittest
from
test
import
support
x
=
2
x
=
2
def
nester
():
def
nester
():
...
@@ -23,8 +22,5 @@ class TestFuture(unittest.TestCase):
...
@@ -23,8 +22,5 @@ class TestFuture(unittest.TestCase):
def
test_nested_scopes
(
self
):
def
test_nested_scopes
(
self
):
self
.
assertEqual
(
nester
(),
3
)
self
.
assertEqual
(
nester
(),
3
)
def
test_main
():
support
.
run_unittest
(
TestFuture
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Lib/test/test_future4.py
Dosyayı görüntüle @
1ed6be37
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
unittest
import
unittest
from
test
import
support
def
test_main
():
pass
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Lib/test/test_future5.py
Dosyayı görüntüle @
1ed6be37
...
@@ -17,5 +17,5 @@ class TestMultipleFeatures(unittest.TestCase):
...
@@ -17,5 +17,5 @@ class TestMultipleFeatures(unittest.TestCase):
self
.
assertEqual
(
s
.
getvalue
(),
"foo
\n
"
)
self
.
assertEqual
(
s
.
getvalue
(),
"foo
\n
"
)
def
test_main
()
:
if
__name__
==
'__main__'
:
support
.
run_unittest
(
TestMultipleFeatures
)
unittest
.
main
(
)
Misc/NEWS
Dosyayı görüntüle @
1ed6be37
...
@@ -644,6 +644,9 @@ Tests
...
@@ -644,6 +644,9 @@ Tests
- Issue #15539: Added regression tests for Tools/scripts/pindent.py.
- Issue #15539: Added regression tests for Tools/scripts/pindent.py.
- Issue #17303: test_future* now work with unittest test discovery.
Patch by Zachary Ware.
- Issue #17163: test_file now works with unittest test discovery.
- Issue #17163: test_file now works with unittest test discovery.
Patch by Zachary Ware.
Patch by Zachary Ware.
...
...
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