summaryrefslogtreecommitdiff
path: root/tests/test_notify.py
Commit message (Collapse)AuthorAgeFilesLines
* Use relative imports throughout testsJon Dufresne2017-12-101-2/+2
| | | | | | | | | | | | | | 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/+1
|\
| * Always import the system unittestJon Dufresne2017-12-011-1/+1
| | | | | | | | | | | | | | 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.
* Further skipping of slow testsDaniele Varrazzo2017-02-021-0/+1
|
* Allow skipping the slow testmanylinuxDaniele Varrazzo2017-02-021-1/+8
| | | | | | | | 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-5/+5
|
* Allow connection.notices and notifies to be replaced.Daniele Varrazzo2015-06-021-0/+22
| | | | Close #326
* Testing external script independent from psycopg implementationDaniele Varrazzo2013-04-191-5/+6
| | | | Patch needed to run the test suite on psycopg2cffi or psycopg2ct.
* Testing boilerplate unified in a single base classDaniele Varrazzo2013-04-071-9/+2
| | | | | The class makes a connection always available, allows creating new connection and closes everything on tear down.
* Tweaks to test timing to avoid errors on test VMsDaniele Varrazzo2011-02-201-3/+3
|
* 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.
* | Fixed notification tests to run on Py3.Daniele Varrazzo2010-12-311-1/+2
| | | | | | | | Call 2to3 on the dynamically generated scripts.
* | Test suite converted into a proper package.Daniele Varrazzo2010-12-211-8/+4
|/ | | | | | 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.
* Add a small delay to receive notification when testing on busy network.Daniele Varrazzo2010-11-191-0/+3
|
* Test cleanup.Daniele Varrazzo2010-11-191-4/+2
| | | | | | Tests pass or fail gracefully on older PostgreSQL versions. If unittest2 is available, skip tests instead of printing warnings.
* Fixed tests to run on Windows.Daniele Varrazzo2010-11-111-1/+2
|
* The Notify type is hashable.Daniele Varrazzo2010-11-051-0/+5
| | | | | If there is no payload, hash the same way the equivalent 2-tuple does. Otherwise hash on the payload too.
* Payload default is the empty string.Daniele Varrazzo2010-11-051-1/+1
|
* Added comparison between Notify objects and Notify or tuple.Daniele Varrazzo2010-11-051-0/+16
| | | | | | Explicit comparison with the tuple is required if we want to make Notify() == (pid, channel) work: item access is not enough (and a test in the suite fails if we get this wrong).
* Notify object exposed in the extensions module.Daniele Varrazzo2010-11-051-0/+23
|
* Adding Notify object with payload.Daniele Varrazzo2010-11-051-3/+36
|
* Check the correctness of the PID in the notify tests.Daniele Varrazzo2010-11-051-8/+15
|
* More lenient test timeout for a slow (or busy) machine.Daniele Varrazzo2010-04-231-2/+2
|
* Notifications are automatically read after each query.Daniele Varrazzo2010-04-211-0/+100
Added tests for basic notifications process.