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
da42abf4
Commit
da42abf4
authored
Jul 31, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the no cover pragmas.
parent
146255e0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
.coveragerc
.coveragerc
+1
-1
persistent/__init__.py
persistent/__init__.py
+5
-5
persistent/_compat.py
persistent/_compat.py
+2
-2
persistent/interfaces.py
persistent/interfaces.py
+1
-1
persistent/timestamp.py
persistent/timestamp.py
+3
-3
persistent/wref.py
persistent/wref.py
+1
-1
No files found.
.coveragerc
View file @
da42abf4
...
...
@@ -3,7 +3,7 @@ source = persistent
[report]
exclude_lines =
#
pragma: no cover
pragma: no cover
class I[A-Z]\w+\((Interface|I[A-Z].*)\):
raise NotImplementedError
raise AssertionError
persistent/__init__.py
View file @
da42abf4
...
...
@@ -26,7 +26,7 @@ if not PURE_PYTHON:
from
persistent.cPersistence
import
CHANGED
from
persistent.cPersistence
import
STICKY
from
persistent.cPersistence
import
simple_new
except
ImportError
:
#
pragma NO COVER
except
ImportError
:
#
pragma: no cover
from
persistent.persistence
import
Persistent
from
persistent.persistence
import
GHOST
from
persistent.persistence
import
UPTODATE
...
...
@@ -39,7 +39,7 @@ if not PURE_PYTHON:
# is available. Note that the Python version already does this.
try
:
from
zope.interface
import
classImplements
except
ImportError
:
#
pragma NO COVER
except
ImportError
:
#
pragma: no cover
pass
else
:
from
persistent.interfaces
import
IPersistent
...
...
@@ -47,17 +47,17 @@ if not PURE_PYTHON:
try
:
from
persistent.cPickleCache
import
PickleCache
except
ImportError
:
#
pragma NO COVER
except
ImportError
:
#
pragma: no cover
from
persistent.picklecache
import
PickleCache
try
:
import
persistent.TimeStamp
except
ImportError
:
#
pragma NO COVER
except
ImportError
:
#
pragma: no cover
import
persistent.timestamp
as
TimeStamp
import
sys
sys
.
modules
[
'persistent.TimeStamp'
]
=
sys
.
modules
[
'persistent.timestamp'
]
else
:
#
pragma NO COVER
else
:
#
pragma: no cover
from
persistent.persistence
import
Persistent
from
persistent.persistence
import
GHOST
from
persistent.persistence
import
UPTODATE
...
...
persistent/_compat.py
View file @
da42abf4
...
...
@@ -14,7 +14,7 @@
import
sys
if
sys
.
version_info
[
0
]
>
2
:
#
pragma NO COVER
if
sys
.
version_info
[
0
]
>
2
:
#
pragma: no cover
import
copyreg
as
copy_reg
from
collections
import
UserDict
as
IterableUserDict
from
collections
import
UserList
...
...
@@ -36,7 +36,7 @@ if sys.version_info[0] > 2: #pragma NO COVER
PYTHON3
=
True
PYTHON2
=
False
else
:
#
pragma NO COVER
else
:
#
pragma: no cover
import
copy_reg
from
UserDict
import
IterableUserDict
from
UserList
import
UserList
...
...
persistent/interfaces.py
View file @
da42abf4
...
...
@@ -23,7 +23,7 @@ try:
from
persistent.cPersistence
import
UPTODATE
from
persistent.cPersistence
import
CHANGED
from
persistent.cPersistence
import
STICKY
except
ImportError
:
#
pragma NO COVER
except
ImportError
:
#
pragma: no cover
GHOST
=
-
1
UPTODATE
=
0
CHANGED
=
1
...
...
persistent/timestamp.py
View file @
da42abf4
...
...
@@ -24,7 +24,7 @@ _MAXINT = sys.maxsize
def
_makeOctets
(
s
):
if
sys
.
version_info
<
(
3
,):
return
bytes
(
s
)
return
bytes
(
s
,
'ascii'
)
#
pragma NO COVERAGE
return
bytes
(
s
,
'ascii'
)
#
pragma: no cover
_ZERO
=
_makeOctets
(
'
\
x00
'
*
8
)
...
...
@@ -175,7 +175,7 @@ class pyTimeStamp(object):
x
=
_wraparound
(
x
)
if
x
==
-
1
:
#pragma: no cover
if
x
==
-
1
:
#
pragma: no cover
# The C version has this condition, but it's not clear
# why; it's also not immediately obvious what bytestring
# would generate this---hence the no-cover
...
...
@@ -212,5 +212,5 @@ class pyTimeStamp(object):
try
:
from
persistent._timestamp
import
TimeStamp
except
ImportError
:
#
pragma NO COVER
except
ImportError
:
#
pragma: no cover
TimeStamp
=
pyTimeStamp
persistent/wref.py
View file @
da42abf4
...
...
@@ -83,7 +83,7 @@ class PersistentWeakKeyDictionary(Persistent):
self
.
update
(
adict
)
# XXX 'kwargs' is pointless, because keys must be strings, but we
# are going to try (and fail) to wrap a WeakRef around them.
if
kwargs
:
#
pragma NO COVER
if
kwargs
:
#
pragma: no cover
self
.
update
(
kwargs
)
def
__getstate__
(
self
):
...
...
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