summaryrefslogtreecommitdiff
path: root/tests/test_copy.py
Commit message (Collapse)AuthorAgeFilesLines
* Avoid installing tests to site-packagesJon Dufresne2017-12-101-3/+2
| | | | | | | | 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-9/+9
| | | | | | | | | | | | | | 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.
* | Remove unnecessary script_to_py3; make scripts compatible insteadJon Dufresne2017-12-011-3/+3
|/ | | | Part of the work towards moving tests out of the installed package.
* Remove io.TextIOBase workaround for Python <= 2.5Jon Dufresne2017-11-261-4/+1
| | | | | io.TextIOBase is available on all Python versions supported by psycopg2. Can remove all workarounds.
* Use modern except syntax throughout projectJon Dufresne2017-11-201-1/+1
| | | | | | The syntax "except Exception, exc:" is deprecated. All Python versions supported by psycopg2 support the newer, modern syntax. Forward compatible with future Python versions.
* Further skipping of slow testsDaniele Varrazzo2017-02-021-0/+2
|
* Allow skipping the slow testmanylinuxDaniele Varrazzo2017-02-021-2/+5
| | | | | | | | It's not so much about tests being slow: some just get stuck and timeout travis. Skipped all tests taking about more than 0.2s to run on my laptop. Fast testing takes about 8s instead of 24.
* Python source cleanup using flake8Daniele Varrazzo2016-10-111-17/+22
|
* Propagate read error messages in COPY FROMDaniele Varrazzo2015-02-081-0/+28
| | | | Fix ticket #270.
* Fixed segfault if COPY statements are executedDaniele Varrazzo2014-06-061-1/+39
| | | | Close ticket #219
* Skip rowcount on copy test on postgres < 8.2Daniele Varrazzo2014-05-131-1/+2
| | | | It looks like the server doesn't send the message.
* Copy operations correctly set the cursor.rowcount attributeDaniele Varrazzo2014-05-051-0/+28
| | | | Fixes ticket #180.
* Added test to verify copysize handling in copy_expertDaniele Varrazzo2013-05-061-0/+14
| | | | | | | | Not an original psycopg2 bug but present in pure python implementation, e.g. ctypes issue #25 and cffi issue #5. https://github.com/mvantellingen/psycopg2-ctypes/issues/25 https://github.com/chtd/psycopg2cffi/pull/5
* Testing boilerplate unified in a single base classDaniele Varrazzo2013-04-071-7/+4
| | | | | The class makes a connection always available, allows creating new connection and closes everything on tear down.
* Tests tweaked to run on all the supported versionsDaniele Varrazzo2013-03-181-13/+3
|
* Allocate dynamically memory for the list of columns in COPYDaniele Varrazzo2011-09-121-0/+19
| | | | Some bloke finds the limit of 8K too restrictive... ticket #68.
* Fixed copyfile refcount in copy_expertDaniele Varrazzo2011-06-071-0/+9
| | | | | | | In case of early error, jumping to exit would have decref'd the borrowed reference to file. Issue spotted by Dave Malcolm, thanks!
* Added complete roundtrip test with copy_expert and UnicodeDaniele Varrazzo2011-02-191-1/+34
|
* COPY sends unicode to a file if it derives from io.TextIoBaseDaniele Varrazzo2011-02-051-3/+57
| | | | Fixes ticket #36.
* Merge branch 'python2' into python3Daniele Varrazzo2011-01-101-0/+23
|\ | | | | | | | | | | | | | | | | Conflicts: NEWS-2.3 tests/__init__.py tests/test_lobject.py tests/test_quote.py tests/testutils.py
| * Added license to unit testsDaniele Varrazzo2011-01-091-0/+23
| | | | | | | | As the test suite is now part of the source distribution.
| * All tests made executable.Daniele Varrazzo2011-01-071-0/+0
| |
* | Use ascii_letters instead of letters.Daniele Varrazzo2010-12-311-6/+6
| | | | | | | | The latter is locale-dependent and not available on Py3.
* | Test suite converted into a proper package.Daniele Varrazzo2010-12-211-3/+3
|/ | | | | | Dropped cyclic import from modules to tests: they were only working because a second copy of the package was found in the project dir. Use relative import so that 2to3 can do a good conversion.
* Test cleanup.Daniele Varrazzo2010-11-191-1/+14
| | | | | | Tests pass or fail gracefully on older PostgreSQL versions. If unittest2 is available, skip tests instead of printing warnings.
* Exceptions raised by the columns iterator propagated.Daniele Varrazzo2010-07-101-0/+14
|
* Added test to verify copy_from() with columns.Daniele Varrazzo2010-07-101-1/+14
|
* Added some COPY tests.Daniele Varrazzo2010-04-071-0/+104