summaryrefslogtreecommitdiff
path: root/tests/helper.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove all Python 2 Python codeChristoph Reiter2020-04-151-3/+1
|
* Move all py2/3 compat code into gi._compatChristoph Reiter2018-04-071-2/+1
|
* tests_gi: Use capture_output() context manager instead of manually mocking ↵Christoph Reiter2018-03-111-1/+1
| | | | stdout
* tests: Make it possible to use pytest directlywip/creiter/pytest-directChristoph Reiter2018-02-121-1/+3
| | | | | | | | | | | pytest will just import the files passed to it and try to run tests. Since we need to run some setup code convert the tests directory to a Python package and do the initialization in __init__.py. This makes the init code (env vars, typelib search path, dbus) always run when something from the package gets imported. python3 setup.py build_tests # build pygobject and tests py.test-3 tests/test_gi.py # run tests in test_gi.py only
* tests: remove python 2.5/3.2 compat codeChristoph Reiter2017-04-021-1/+1
| | | | 2.7/3.3 support the u/b prefixes and both have callable()
* tests: fix invalid regex escapingChristoph Reiter2017-04-021-2/+2
| | | | | Python 3.6 got stricter here and raises warnings/errors for invalid escape sequences.
* Remove gi._gi._gobject and gi._gobject modulesChristoph Reiter2017-04-011-2/+2
| | | | | | | | | | Expose everything from _gi._gobject in _gi instead. This does not move any code around, just removes the module. Also removes the gi._gobject package and replaces it with a small dummy module in gi.__init__.py https://bugzilla.gnome.org/show_bug.cgi?id=735206
* tests: Silence various error messages and warnings.Christoph Reiter2015-07-021-0/+132
This silences glib warnings which are due to testing of error handling, deprecation warnings which we ignore since we want to continue testing deprecated code and other error output of code which is supposed to fail. To reduce code duplication and make things easier this introduces a shared helper module containing various context managers and decorators which allow testing and silencing of warnings and errors. https://bugzilla.gnome.org/show_bug.cgi?id=751156