Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: tests: run generic ZODBTests from ZODB #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jmuchemb
Copy link
Member

testZODB from ZODB is another set of generic tests that can be reused to check storage implementations. NEO runs them.

Note sure if ZODBTests is pertinent for any storage behind ZEO so I suggest to only add it to FileStorageTests. And contrary to other tests, ZODBTests expects a DB object as a _db attribute of the test case, hence the hacky property.

More generally, it would be good to review the ZODB test suite so that at least, storage implementations don't miss generic tests.

@jmuchemb
Copy link
Member Author

Currently, 4 failures:

Error in test checkExplicitTransactionManager (ZEO.tests.testZEO.FileStorageTests)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "ZODB/tests/testZODB.py", line 174, in checkExplicitTransactionManager
    self.assertEqual(r2['item'], 1)
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'item'

Failure in test checkMultipleUndoInOneTransaction (ZEO.tests.testZEO.FileStorageTests)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "ZODB/tests/testZODB.py", line 464, in checkMultipleUndoInOneTransaction
    self.assertEqual(root['state'], 0) 
  File "/usr/lib/python2.7/unittest/case.py", line 513, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 506, in _baseAssertEqual
    raise self.failureException(msg)   
AssertionError: 5 != 0

Failure in test checkResetCache (ZEO.tests.testZEO.FileStorageTests)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "ZODB/tests/testZODB.py", line 134, in checkResetCache
    self.assertTrue(len(conn._cache) > 0)  # Precondition
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)   
AssertionError: False is not true

Failure in test checkResetCachesAPI (ZEO.tests.testZEO.FileStorageTests)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "ZODB/tests/testZODB.py", line 144, in checkResetCachesAPI
    self.assertTrue(len(conn._cache) > 0)  # Precondition
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant