Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f102fc5f
Commit
f102fc5f
authored
Jul 27, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test_main() methods. These three tests were never run
by regrtest.py. We really need a simpler testing framework.
parent
9aed98fe
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
Lib/test/test_defaultdict.py
Lib/test/test_defaultdict.py
+5
-1
Lib/test/test_iterlen.py
Lib/test/test_iterlen.py
+5
-3
Lib/test/test_uuid.py
Lib/test/test_uuid.py
+7
-2
No files found.
Lib/test/test_defaultdict.py
View file @
f102fc5f
...
@@ -4,6 +4,7 @@ import os
...
@@ -4,6 +4,7 @@ import os
import
copy
import
copy
import
tempfile
import
tempfile
import
unittest
import
unittest
from
test
import
test_support
from
collections
import
defaultdict
from
collections
import
defaultdict
...
@@ -131,5 +132,8 @@ class TestDefaultDict(unittest.TestCase):
...
@@ -131,5 +132,8 @@ class TestDefaultDict(unittest.TestCase):
self
.
assertEqual
(
d2
,
d1
)
self
.
assertEqual
(
d2
,
d1
)
def
test_main
():
test_support
.
run_unittest
(
TestDefaultDict
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
test_
main
()
Lib/test/test_iterlen.py
View file @
f102fc5f
...
@@ -235,9 +235,7 @@ class TestSeqIterReversed(TestInvariantWithoutMutations):
...
@@ -235,9 +235,7 @@ class TestSeqIterReversed(TestInvariantWithoutMutations):
self
.
assertEqual
(
len
(
it
),
0
)
self
.
assertEqual
(
len
(
it
),
0
)
def
test_main
():
if
__name__
==
"__main__"
:
unittests
=
[
unittests
=
[
TestRepeat
,
TestRepeat
,
TestXrange
,
TestXrange
,
...
@@ -255,3 +253,7 @@ if __name__ == "__main__":
...
@@ -255,3 +253,7 @@ if __name__ == "__main__":
TestSeqIterReversed
,
TestSeqIterReversed
,
]
]
test_support
.
run_unittest
(
*
unittests
)
test_support
.
run_unittest
(
*
unittests
)
if
__name__
==
"__main__"
:
test_main
()
Lib/test/test_uuid.py
View file @
f102fc5f
from
unittest
import
TestCase
,
main
from
unittest
import
TestCase
from
test
import
test_support
import
uuid
import
uuid
def
importable
(
name
):
def
importable
(
name
):
...
@@ -392,5 +393,9 @@ class TestUUID(TestCase):
...
@@ -392,5 +393,9 @@ class TestUUID(TestCase):
equal
(
u
,
uuid
.
UUID
(
v
))
equal
(
u
,
uuid
.
UUID
(
v
))
equal
(
str
(
u
),
v
)
equal
(
str
(
u
),
v
)
def
test_main
():
test_support
.
run_unittest
(
TestUUID
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
test_
main
()
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