summaryrefslogtreecommitdiff
path: root/tests/test_extras_dictcursor.py
Commit message (Collapse)AuthorAgeFilesLines
* Added reason for skipping on CockroachDBDaniele Varrazzo2020-07-271-14/+14
|
* Some extra cursors test skipped on CockroachDBDaniele Varrazzo2020-07-221-1/+19
| | | | Skip named cursor tests
* Fixed copy() on DictRowfix-1073Daniele Varrazzo2020-04-061-0/+29
| | | | Close #1073.
* Copyright bumped to 2020Daniele Varrazzo2020-01-171-0/+1
|
* fix `NamedTupleCursor._cached_make_nt`Changaco2019-06-041-1/+1
|
* improve the NamedTupleCursor cache testChangaco2019-06-041-0/+10
|
* RealDictRow inherits from OrderedDictfix-886Daniele Varrazzo2019-04-061-1/+16
| | | | | | | | Now its state is unmodified, so apart from special-casing creation and initial population can work unmodified, and all the desired properties just work (modifiability, picklability...) Close #886.
* Fixed RealDictCursor.pop()Daniele Varrazzo2019-04-061-0/+19
| | | | Addresses #886, but there might be something else broken there.
* Move imports to the top of the module across testsJon Dufresne2019-03-161-6/+5
| | | | | | | | | | Allows removing many duplicate imports and better follows PEP8 guidelines: https://www.python.org/dev/peps/pep-0008/#imports > Imports are always put at the top of the file, just after any module > comments and docstrings, and before module globals and constants.
* Copyright year updatedDaniele Varrazzo2019-02-171-1/+1
| | | | | ag -l Copyright | xargs sed -i \ "s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*\)/\1-$(date +%Y)\3/I"
* Use a proper LRU cache for namedtuplesfast-namedtupleDaniele Varrazzo2019-02-021-13/+16
| | | | | | | | | Previous one didn't refresh by last use. Use the stdlib version for py3 and one of our own for py2. Max size set to 512, which should be fine for everyone (tweaking is still possible by monkeypatching, as the tests do, but I don't want to make an interface of it).
* Added caching of types generated by NamedTupleCursorDaniele Varrazzo2019-02-021-0/+36
| | | | see #838
* Full flake8 3.5 cleanupDaniele Varrazzo2018-10-231-0/+1
|
* DictCursor and RealDictCursor rows maintain columns orderDaniele Varrazzo2018-05-211-2/+63
| | | | Close #177.
* Added tests to verify iter methods on dict cursorsDaniele Varrazzo2018-05-201-1/+64
| | | | ISTM the refactoring in #648 broke something
* DictCursor/RealDictCursor tests splitDaniele Varrazzo2018-05-201-78/+82
|
* Skipped test on db version not supporting unicode identifiersfix-211Daniele Varrazzo2018-05-181-0/+1
|
* Allow non-ascii chars in namedtuple fieldsDaniele Varrazzo2018-05-181-1/+8
| | | | | | | They can be valid chars in Python 3. Or maybe not? In which case Python will throw an exception, but that's fine. Fix regression introduced fixing #211
* Convert fields names into valid Python identifiers in NamedTupleCursorDaniele Varrazzo2018-01-291-0/+8
| | | | Close #211.
* Avoid installing tests to site-packagesJon Dufresne2017-12-101-1/+1
| | | | | | | | For library end users, there is no need to install tests alongside the package itself. This keeps the tests available for development without adding extra packages to user's site-packages directory. Reduces the size of the installed package. Avoids accidental execution of test code by an installed package.
* Use relative imports throughout testsJon Dufresne2017-12-101-1/+1
| | | | | | | | | | | | | | The tests relied on Python2 relative import semantics. Python3 changed import semantics to always search sys.path by default. To import using a relative path it must have a leading dot. Forward compatible with newer Pythons. Works towards the goal of moving tests outside of the installed package. For more information, see PEP-328: https://www.python.org/dev/peps/pep-0328/
* Merge remote-tracking branch 'jdufresne/import-unittest'Daniele Varrazzo2017-12-021-1/+2
|\
| * Always import the system unittestJon Dufresne2017-12-011-1/+2
| | | | | | | | | | | | | | There is no need to import testutils.unittest instead of simply unittest. They are simple aliases. Use system unittest to be more regular, consistent as well as idiomatic with the wider Python community.
* | Use builtin function next() throughout projectJon Dufresne2017-12-011-4/+4
|/ | | | | | | Available since Python 2.6. Use of .next() is deprecated and not supported in Python 3. Forward compatible with modern Python. https://docs.python.org/2/library/functions.html#next
* Remove workarounds for namedtuple on Python <= 2.5Jon Dufresne2017-11-261-41/+0
| | | | | | namedtuple is available on all Python versions supported by psycopg2. It was first introduced in Python 2.6. Can remove all workarounds and special documentation.
* Python source cleanup using flake8Daniele Varrazzo2016-10-111-8/+7
|
* Testing boilerplate unified in a single base classDaniele Varrazzo2013-04-071-21/+10
| | | | | The class makes a connection always available, allows creating new connection and closes everything on tear down.
* Fixed pickling of DictRow objects tooDaniele Varrazzo2012-12-111-0/+14
|
* Fixed pickling of RealDictRow objectsDaniele Varrazzo2012-12-101-0/+12
|
* Added tests to verify cursor() arguments propagationDaniele Varrazzo2012-04-111-0/+16
|
* Fixed NamedTupleCursor rownumber during iteration.Daniele Varrazzo2012-02-231-1/+30
| | | | | | | The correction is similar to the other one for the other subclasses. Also added tests for rowcount and rownumber during different fetch styles. Just in case.
* Fixed rownumber for cursor subclasses during iterationsDaniele Varrazzo2012-02-231-0/+28
| | | | | | | Regression introduced to fix ticket #80. Don't use fetchmany to get the chunks of values. I did it that way because I was ending up into infinite recursion calling __iter__ from __iter__: the solution has been the "while 1: yield next()" idiom.
* Test methods reordered to improve readabilityDaniele Varrazzo2012-02-231-27/+29
|
* Added tests to verify ticket #84Daniele Varrazzo2012-01-101-0/+24
| | | | fetchmany() with no arg is broken in cursor subclasses.
* Named DictCursor/RealDictCursor honour itersizeDaniele Varrazzo2011-12-111-0/+25
| | | | Closes ticket #80.
* All unit test modules have a test_ prefixDaniele Varrazzo2011-10-191-0/+344
Both for consistency and for test discovery.