Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
persistent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
persistent
Commits
1c1cebaf
Commit
1c1cebaf
authored
Feb 22, 2017
by
Adam Groszer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
provoke __setstate__ intern issue
parent
769b0e63
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
persistent/tests/test_persistence.py
persistent/tests/test_persistence.py
+11
-0
No files found.
persistent/tests/test_persistence.py
View file @
1c1cebaf
...
@@ -998,6 +998,17 @@ class _Persistent_Base(object):
...
@@ -998,6 +998,17 @@ class _Persistent_Base(object):
inst1
.
__setstate__
({
mystr
:
2
})
inst1
.
__setstate__
({
mystr
:
2
})
self
.
assertTrue
(
mystr
in
inst1
.
__dict__
)
self
.
assertTrue
(
mystr
in
inst1
.
__dict__
)
def
test___setstate___doesnt_fail_on_non_dict
(
self
):
class
Derived
(
self
.
_getTargetClass
()):
pass
inst1
=
Derived
()
import
UserDict
state
=
UserDict
.
IterableUserDict
({
'foobar'
:
[
1
,
2
]})
inst1
.
__setstate__
(
state
)
self
.
assertTrue
(
hasattr
(
inst1
,
'foobar'
))
def
test___reduce__
(
self
):
def
test___reduce__
(
self
):
from
persistent._compat
import
copy_reg
from
persistent._compat
import
copy_reg
inst
=
self
.
_makeOne
()
inst
=
self
.
_makeOne
()
...
...
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