- edited description
__reduce__ failure in _defer_name(), misnamed test
This single failure occurs under pythons 2.7 3.2, 3.3 3.4 & pypy. Here is the traceback under pypy;
....E...................................................SSSSSSSS...............
=================================================================
ERROR: test.sql.test_types.PickleMetadataTest.testmeta
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/pypy/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/mnt/gen2/TmpDir/portage/dev-python/sqlalchemy-0.9.7/work/SQLAlchemy-0.9.7-pypy/test/sql/test_types.py", line 260, in testmeta
loads(dumps(column_type))
File "/usr/lib64/pypy/lib_pypy/cPickle.py", line 600, in loads
return Unpickler(f).load()
File "/usr/lib64/pypy/lib_pypy/cPickle.py", line 170, in load
self.dispatch[key](self)
File "/usr/lib64/pypy/lib_pypy/cPickle.py", line 439, in load_reduce
value = self.stack[-1](*args)
TypeError: __new__() takes exactly 2 arguments (3 given)
----------------------------------------------------------------------
Ran 5926 tests in 705.219s
FAILED (SKIP=221, errors=1)
and under py3.4;
===============================================================
ERROR: test.sql.test_types.PickleMetadataTest.testmeta
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.4/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/mnt/gen2/TmpDir/portage/dev-python/sqlalchemy-0.9.7/work/SQLAlchemy-0.9.7-python3_4/test/sql/test_types.py", line 260, in testmeta
loads(dumps(column_type))
TypeError: __new__() takes 2 positional arguments but 3 were given
----------------------------------------------------------------------
Ran 5960 tests in 162.581s
FAILED (SKIP=193, errors=1)
errors=1 out of 5960 tests is a fine job any day of the week. The no. or args appears a triviality. Do you require anything further
Comments (23)
-
reporter -
repo owner i don't get any failures on pypy (see http://jenkins.sqlalchemy.org/job/sqlalchemy-default-sqlite-pypy-2.7/) and i dont get that py3.4 failure either (though im on 3.4.0rc2).
so, versions please, as well as command used to run tests
-
Account Deleted This bug was introduced with
commit d462dbde99762bfbdc4d4af7f67c329350a8700a
, more precisely with_defer_name.__new__()
accepting only one parameter:class _defer_name(_truncated_label): """mark a name as 'deferred' for the purposes of automated name generation. """ def __new__(cls, value): ...
If
__new__()
also eats additional parameters, the test runs fine:class _defer_name(_truncated_label): """mark a name as 'deferred' for the purposes of automated name generation. """ def __new__(cls, value, *rest): ...
Someone who knows better than I should look at this though, I don't know where the additional parameter originates (and if the issue rather should be fixed there).
-
repo owner ah. well here's the first problem:
diff --git a/test/sql/test_types.py b/test/sql/test_types.py index e2d3479..827a9a8 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -234,7 +234,7 @@ class TypeAffinityTest(fixtures.TestBase): class PickleMetadataTest(fixtures.TestBase): - def testmeta(self): + def test_meta(self): for loads, dumps in picklers(): column_types = [ Column('Boo', Boolean()),
-
repo owner - marked as critical
-
repo owner - changed title to __reduce__ failure in _defer_name(), misnamed test
-
repo owner - changed status to resolved
- Fixed 0.9.7 regression caused by
3067
in conjunction with a mis-named unit test such that so-called "schema" types like :class:.Boolean
and :class:.Enum
could no longer be pickled. fixes#3144
→ <<cset 405c223ae50e>>
-
repo owner - Fixed 0.9.7 regression caused by
3067
in conjunction with a mis-named unit test such that so-called "schema" types like :class:.Boolean
and :class:.Enum
could no longer be pickled. fixes#3144
→ <<cset e974bed379e4>>
- Fixed 0.9.7 regression caused by
-
reporter thanks Mike. First class timing, first class response. My only concern is how you didn't get those failures in your own initial testing.
Ran 5960 tests in 160.298s
OK (SKIP=192)
-
repo owner because the test was mis-named and in the move to pytest that naming scheme got lost
-
reporter I see
-
reporter hmm $ PYTHONPATH=. py.test test yielded == 5807 passed, 740 skipped in 243.77 seconds == as opposed to above.
What is your recommended mode of running? python sqla_nose.py OR py.test test ? Looking like both are about equal
-
repo owner i was wondering if py.test vs. nose had more issues of this nature. you have the sqla_nose count at 5960 and py.test at 5807? that doesn't really sound right.
-
repo owner I'm pretty sure there's a regular reason for this, the py.test system I came up with does discovery differently and it also generates new tests that the nose approach does not (you'll see a difference in names). but aggregate number of tests on a default sqlite run is less so I think i need to grep the lists out and compare just to make sure we aren't missing somehting.
Ran 5874 tests in 119.914s OK (SKIP=177) 5775 passed, 669 skipped in 173.47 seconds =
-
reporter looks like you're making some more headway
-
repo owner basically it seems like nose reports the wrong number at the end. I'm attaching a.txt, which is the nose run with the names normalized, and b.txt which is the pytest run with the names normalized. The number of tests run in both is 5775:
#! classics-MacBook-Pro-2:Desktop classic$ cat a.txt | grep -v SKIP | wc -l 5775 classics-MacBook-Pro-2:Desktop classic$ cat b.txt | grep -v SKIP | wc -l 5775 classics-MacBook-Pro-2:Desktop classic$ cat a.txt | grep SKIP | wc -l 177 classics-MacBook-Pro-2:Desktop classic$ cat b.txt | grep SKIP | wc -l 669
The skips are counted differently in that nose does per-suite skips as one skip and pytest does not. I have no idea what 5874 is, I have a feeling nose is counting things that my own nose plugin reports as "not a test".
-
repo owner - attached a.txt
-
repo owner - attached b.txt
-
repo owner the next thing is why the heck are there so fewer tests in master than in 0.9
-
repo owner OK I found some things in master due to my recent changes in the test suite, that's fixed.
-
Account Deleted So is py.test the recommended way of testing? If so, I could get rid of the patch against sqla_nose.py in the Fedora packages which makes it test the code in build/ instead of what is installed.
-
repo owner py.test is currently the new "standard", based on the nose developers said they were no longer supporting nose and the "2.0" version has been stalled. py.test gives me a lot more capabilities in controlling how tests are discovered and run (things that nose could do also if they were still developing it).
-
repo owner though that lib thing you mention in sqla_nose, maybe there's a way that could detect if "python setup.py test" were being run and adjust the path accordingly.
- Log in to comment