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
3a03d2ea
Kaydet (Commit)
3a03d2ea
authored
Şub 15, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#17163: test_file now works with unittest test discovery. Patch by Zachary Ware.
üst
a90b7132
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
test_file.py
Lib/test/test_file.py
+10
-14
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_file.py
Dosyayı görüntüle @
3a03d2ea
...
@@ -10,7 +10,7 @@ import _pyio as pyio
...
@@ -10,7 +10,7 @@ import _pyio as pyio
from
test.support
import
TESTFN
,
run_unittest
from
test.support
import
TESTFN
,
run_unittest
from
collections
import
UserList
from
collections
import
UserList
class
AutoFileTests
(
unittest
.
TestCase
)
:
class
AutoFileTests
:
# file tests for which a test file is automatically set up
# file tests for which a test file is automatically set up
def
setUp
(
self
):
def
setUp
(
self
):
...
@@ -128,14 +128,14 @@ class AutoFileTests(unittest.TestCase):
...
@@ -128,14 +128,14 @@ class AutoFileTests(unittest.TestCase):
def
testReadWhenWriting
(
self
):
def
testReadWhenWriting
(
self
):
self
.
assertRaises
(
IOError
,
self
.
f
.
read
)
self
.
assertRaises
(
IOError
,
self
.
f
.
read
)
class
CAutoFileTests
(
AutoFileTests
):
class
CAutoFileTests
(
AutoFileTests
,
unittest
.
TestCase
):
open
=
io
.
open
open
=
io
.
open
class
PyAutoFileTests
(
AutoFileTests
):
class
PyAutoFileTests
(
AutoFileTests
,
unittest
.
TestCase
):
open
=
staticmethod
(
pyio
.
open
)
open
=
staticmethod
(
pyio
.
open
)
class
OtherFileTests
(
unittest
.
TestCase
)
:
class
OtherFileTests
:
def
testModeStrings
(
self
):
def
testModeStrings
(
self
):
# check invalid mode strings
# check invalid mode strings
...
@@ -322,22 +322,18 @@ class OtherFileTests(unittest.TestCase):
...
@@ -322,22 +322,18 @@ class OtherFileTests(unittest.TestCase):
finally
:
finally
:
os
.
unlink
(
TESTFN
)
os
.
unlink
(
TESTFN
)
class
COtherFileTests
(
OtherFileTests
):
class
COtherFileTests
(
OtherFileTests
,
unittest
.
TestCase
):
open
=
io
.
open
open
=
io
.
open
class
PyOtherFileTests
(
OtherFileTests
):
class
PyOtherFileTests
(
OtherFileTests
,
unittest
.
TestCase
):
open
=
staticmethod
(
pyio
.
open
)
open
=
staticmethod
(
pyio
.
open
)
def
te
st_main
():
def
te
arDownModule
():
# Historically, these tests have been sloppy about removing TESTFN.
# Historically, these tests have been sloppy about removing TESTFN.
# So get rid of it no matter what.
# So get rid of it no matter what.
try
:
if
os
.
path
.
exists
(
TESTFN
):
run_unittest
(
CAutoFileTests
,
PyAutoFileTests
,
os
.
unlink
(
TESTFN
)
COtherFileTests
,
PyOtherFileTests
)
finally
:
if
os
.
path
.
exists
(
TESTFN
):
os
.
unlink
(
TESTFN
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
test_
main
()
unittest
.
main
()
Misc/NEWS
Dosyayı görüntüle @
3a03d2ea
...
@@ -605,6 +605,9 @@ Tests
...
@@ -605,6 +605,9 @@ Tests
- Issue #15539: Added regression tests for Tools/scripts/pindent.py.
- Issue #15539: Added regression tests for Tools/scripts/pindent.py.
- Issue #17163: test_file now works with unittest test discovery.
Patch by Zachary Ware.
- Issue #16925: test_configparser now works with unittest test discovery.
- Issue #16925: test_configparser 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