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
11b3a605
Kaydet (Commit)
11b3a605
authored
Ock 10, 2013
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#16852: merge with 3.3.
üst
f424f385
d0dfe9ad
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
27 deletions
+16
-27
test_genericpath.py
Lib/test/test_genericpath.py
+8
-10
test_macpath.py
Lib/test/test_macpath.py
+2
-6
test_ntpath.py
Lib/test/test_ntpath.py
+1
-5
test_posixpath.py
Lib/test/test_posixpath.py
+2
-6
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_genericpath.py
Dosyayı görüntüle @
11b3a605
...
...
@@ -17,9 +17,7 @@ def safe_rmdir(dirname):
pass
class
GenericTest
(
unittest
.
TestCase
):
# The path module to be tested
pathmodule
=
genericpath
class
GenericTest
:
common_attributes
=
[
'commonprefix'
,
'getsize'
,
'getatime'
,
'getctime'
,
'getmtime'
,
'exists'
,
'isdir'
,
'isfile'
]
attributes
=
[]
...
...
@@ -270,13 +268,17 @@ class GenericTest(unittest.TestCase):
self
.
assertTrue
(
self
.
pathmodule
.
sameopenfile
(
a
.
fileno
(),
b
.
fileno
()))
class
TestGenericTest
(
GenericTest
,
unittest
.
TestCase
):
# Issue 16852: GenericTest can't inherit from unittest.TestCase
# for test discovery purposes; CommonTest inherits from GenericTest
# and is only meant to be inherited by others.
pathmodule
=
genericpath
# Following TestCase is not supposed to be run from test_genericpath.
# It is inherited by other test modules (macpath, ntpath, posixpath).
class
CommonTest
(
GenericTest
):
# The path module to be tested
pathmodule
=
None
common_attributes
=
GenericTest
.
common_attributes
+
[
# Properties
'curdir'
,
'pardir'
,
'extsep'
,
'sep'
,
...
...
@@ -407,9 +409,5 @@ class CommonTest(GenericTest):
self
.
test_abspath
()
def
test_main
():
support
.
run_unittest
(
GenericTest
)
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Lib/test/test_macpath.py
Dosyayı görüntüle @
11b3a605
...
...
@@ -115,13 +115,9 @@ class MacPathTestCase(unittest.TestCase):
self
.
assertEqual
(
normpath
(
b
"a:b:"
),
b
"a:b"
)
class
MacCommonTest
(
test_genericpath
.
CommonTest
):
class
MacCommonTest
(
test_genericpath
.
CommonTest
,
unittest
.
TestCase
):
pathmodule
=
macpath
def
test_main
():
support
.
run_unittest
(
MacPathTestCase
,
MacCommonTest
)
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Lib/test/test_ntpath.py
Dosyayı görüntüle @
11b3a605
...
...
@@ -257,14 +257,10 @@ class TestNtpath(unittest.TestCase):
ntpath
.
sameopenfile
(
-
1
,
-
1
)
class
NtCommonTest
(
test_genericpath
.
CommonTest
):
class
NtCommonTest
(
test_genericpath
.
CommonTest
,
unittest
.
TestCase
):
pathmodule
=
ntpath
attributes
=
[
'relpath'
,
'splitunc'
]
def
test_main
():
support
.
run_unittest
(
TestNtpath
,
NtCommonTest
)
if
__name__
==
"__main__"
:
unittest
.
main
()
Lib/test/test_posixpath.py
Dosyayı görüntüle @
11b3a605
...
...
@@ -462,14 +462,10 @@ class PosixPathTest(unittest.TestCase):
os
.
getcwdb
=
real_getcwdb
class
PosixCommonTest
(
test_genericpath
.
CommonTest
):
class
PosixCommonTest
(
test_genericpath
.
CommonTest
,
unittest
.
TestCase
):
pathmodule
=
posixpath
attributes
=
[
'relpath'
,
'samefile'
,
'sameopenfile'
,
'samestat'
]
def
test_main
():
support
.
run_unittest
(
PosixPathTest
,
PosixCommonTest
)
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Misc/NEWS
Dosyayı görüntüle @
11b3a605
...
...
@@ -614,6 +614,9 @@ Tests
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
- Issue #16852: test_genericpath, test_posixpath, test_ntpath, and test_macpath
now work with unittest test discovery. Patch by Zachary Ware.
- Issue #16748: test_heapq now works with unittest test discovery.
- Issue #10646: Tests rearranged for os.samefile/samestat to check for not
...
...
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