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
be372d73
Commit
be372d73
authored
Apr 23, 2019
by
Windson yang
Committed by
Steve Dower
Apr 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-36678: Rename duplicate tests in test_dataclasses (GH-12899)
parent
d307d053
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
Lib/test/test_dataclasses.py
Lib/test/test_dataclasses.py
+3
-15
No files found.
Lib/test/test_dataclasses.py
View file @
be372d73
...
...
@@ -697,7 +697,7 @@ class TestCase(unittest.TestCase):
y
:
int
self
.
assertNotEqual
(
Point
(
1
,
3
),
C
(
1
,
3
))
def
test_not_
tuple
(
self
):
def
test_not_
other_dataclass
(
self
):
# Test that some of the problems with namedtuple don't happen
# here.
@
dataclass
...
...
@@ -1403,7 +1403,7 @@ class TestCase(unittest.TestCase):
self
.
assertEqual
(
asdict
(
gd
),
{
'id'
:
0
,
'users'
:
{
'first'
:
{
'name'
:
'Alice'
,
'id'
:
1
},
'second'
:
{
'name'
:
'Bob'
,
'id'
:
2
}}})
def
test_helper_asdict_builtin_containers
(
self
):
def
test_helper_asdict_builtin_
object_
containers
(
self
):
@
dataclass
class
Child
:
d
:
object
...
...
@@ -1576,7 +1576,7 @@ class TestCase(unittest.TestCase):
self
.
assertEqual
(
astuple
(
gt
),
(
0
,
((
'Alice'
,
1
),
(
'Bob'
,
2
))))
self
.
assertEqual
(
astuple
(
gd
),
(
0
,
{
'first'
:
(
'Alice'
,
1
),
'second'
:
(
'Bob'
,
2
)}))
def
test_helper_astuple_builtin_containers
(
self
):
def
test_helper_astuple_builtin_
object_
containers
(
self
):
@
dataclass
class
Child
:
d
:
object
...
...
@@ -3242,18 +3242,6 @@ class TestReplace(unittest.TestCase):
".<locals>.D(f=TestReplace.test_recursive_repr_indirection_two"
".<locals>.E(f=...)))"
)
def
test_recursive_repr_two_attrs
(
self
):
@
dataclass
class
C
:
f
:
"C"
g
:
"C"
c
=
C
(
None
,
None
)
c
.
f
=
c
c
.
g
=
c
self
.
assertEqual
(
repr
(
c
),
"TestReplace.test_recursive_repr_two_attrs"
".<locals>.C(f=..., g=...)"
)
def
test_recursive_repr_misc_attrs
(
self
):
@
dataclass
class
C
:
...
...
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