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
39ad8b1c
Commit
39ad8b1c
authored
Jun 30, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove last ZODB-dependent test.
parent
3289af84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
94 deletions
+5
-94
CHANGES.txt
CHANGES.txt
+2
-0
persistent/tests/test_functest_zodb.py
persistent/tests/test_functest_zodb.py
+0
-86
setup.py
setup.py
+3
-8
No files found.
CHANGES.txt
View file @
39ad8b1c
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
4.0 (unreleased)
4.0 (unreleased)
-----------------
-----------------
- Removed all ``ZODB``-dependent tests.
- Added explicit support for Python 3.2 and PyPy.
- Added explicit support for Python 3.2 and PyPy.
- Note that the C implementations of Persistent, PickleCache, and Timestamp
- Note that the C implementations of Persistent, PickleCache, and Timestamp
...
...
persistent/tests/test_functest_zodb.py
deleted
100644 → 0
View file @
3289af84
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
import
unittest
try
:
import
transaction
import
ZODB
except
ImportError
:
HAVE_ZODB
=
False
else
:
HAVE_ZODB
=
True
def
new_ghost_w_persistent_classes
():
"""
Peristent meta classes work too:
>>> import persistent
>>> from persistent.tests.utils import ResettingJar
>>> jar = ResettingJar()
>>> cache = persistent.PickleCache(jar, 10, 100)
>>> import ZODB.persistentclass
>>> class PC:
... __metaclass__ = ZODB.persistentclass.PersistentMetaClass
>>> PC._p_oid
>>> PC._p_jar
>>> PC._p_serial
>>> PC._p_changed
False
>>> cache.new_ghost('2', PC)
>>> PC._p_oid
'2'
>>> PC._p_jar is jar
True
>>> PC._p_serial
>>> PC._p_changed
False
"""
def
cache_invalidate_and_minimize_used_to_leak_None_ref
():
"""Persistent weak references
>>> import transaction
>>> import ZODB.tests.util
>>> db = ZODB.tests.util.DB()
>>> conn = db.open()
>>> conn.root.p = p = conn.root().__class__()
>>> transaction.commit()
>>> import sys
>>> old = sys.getrefcount(None)
>>> conn._cache.invalidate(p._p_oid)
>>> sys.getrefcount(None) - old
0
>>> _ = conn.root.p.keys()
>>> old = sys.getrefcount(None)
>>> conn._cache.minimize()
>>> sys.getrefcount(None) - old
0
>>> db.close()
"""
def
test_suite
():
from
doctest
import
DocTestSuite
if
HAVE_ZODB
:
return
unittest
.
TestSuite
((
DocTestSuite
(),
))
return
unittest
.
TestSuite
()
setup.py
View file @
39ad8b1c
...
@@ -23,9 +23,6 @@ from setuptools import Extension
...
@@ -23,9 +23,6 @@ from setuptools import Extension
from
setuptools
import
find_packages
from
setuptools
import
find_packages
from
setuptools
import
setup
from
setuptools
import
setup
TESTS_REQUIRE
=
[
]
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
README
=
(
open
(
os
.
path
.
join
(
here
,
'README.txt'
)).
read
()
README
=
(
open
(
os
.
path
.
join
(
here
,
'README.txt'
)).
read
()
+
'
\
n
\
n
'
+
+
'
\
n
\
n
'
+
...
@@ -97,10 +94,9 @@ setup(name='persistent',
...
@@ -97,10 +94,9 @@ setup(name='persistent',
zip_safe
=
False
,
zip_safe
=
False
,
ext_modules
=
ext_modules
,
ext_modules
=
ext_modules
,
headers
=
headers
,
headers
=
headers
,
tests_require
=
TESTS_REQUIRE
,
extras_require
=
{
extras_require
=
{
'test'
:
TESTS_REQUIRE
,
'test'
:
()
,
'testing'
:
TESTS_REQUIRE
+
[
'nose'
,
'coverage'
],
'testing'
:
[
'nose'
,
'coverage'
],
'docs'
:
[
'Sphinx'
,
'repoze.sphinx.autointerface'
],
'docs'
:
[
'Sphinx'
,
'repoze.sphinx.autointerface'
],
},
},
test_suite
=
"persistent.tests"
,
test_suite
=
"persistent.tests"
,
...
@@ -109,5 +105,4 @@ setup(name='persistent',
...
@@ -109,5 +105,4 @@ setup(name='persistent',
],
],
entry_points
=
"""
\
entry_points
=
"""
\
"""
"""
)
)
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