Commit graph

119 commits

Author SHA1 Message Date
Felix Schurk
93356b39c3 add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
Adrian Sadłocha
bb72ea6169
Remove encoding declaration in Python files (#3568)
As per
https://docs.python.org/3.11/reference/lexical_analysis.html#encoding-declarations,
the default encoding of Python files is UTF-8. In fact, it's been the
default encoding since Python 3.0 (released in 2008).
2024-07-26 23:36:23 -04:00
Felix Schurk
5ab51271b0
increase timout to 10s and run on ubuntu-latest (#3523)
As identified in #3512 it seams as the problem was the internal timeout.
Closes #3507.
2024-06-28 18:11:53 -04:00
Felix Schurk
e0e6ea7170
remove test certificates and link in python code (#3506)
With taskwarrior > 3.0 these are no longer required and thus can be
removed.
2024-06-22 19:52:43 -04:00
Dustin J. Mitchell
28a46880a2
Treat a nonzero exit status as a failure (#3430)
And fix the test cases that have been failing ,undetected
2024-05-03 13:58:09 +00:00
Felix Schurk
d093ce3d84
Fix test script paths (#3387)
* fix path to task executable in pyton tests

The current approach would copy the current files into the `build/test`
directory. Updating the paths according to the custom user setup.

By the copy I appended `.py` to have a clear visible distingtion which
ones are the python tests.

As soon as a source file in the normal directory is changed, it is
copied over and the corresponding file is updated.

From now on the python tests would need to get run in the according
build directory.

* reflect the current build instruction in PR template

* update paths and globing in run_all

* add line break for every cpp test

* remove .gitignore in test folder

As now all the auxillary files such as `all.log` as well as the
executables are present in the `build` directory there is no longer a
need to ignore them.

* update paths in python test scripts and enable deactivated

* remove .py extension when copy to build

Further remove glob pattern for `*.t.py` tests.

* remove accidentally added template.t from test files
2024-04-28 15:38:14 -04:00
Dustin J. Mitchell
31105c2ba3
Sync against taskchampion-sync-server (#3118)
This removes use of gnutls and the TLS implementation, which is no
longer needed (task synchronization is handled via Taskchampion, which
uses `reqwest`, which handles TLS via other Rust dependencies). This
incidentally removes the following config options:
 * `debug.tls`
 * `taskd.ca`
 * `taskd.certificate`
 * `taskd.ciphers`
 * `taskd.credentials`
 * `taskd.key`
 * `taskd.server`
 * `taskd.trust`
2023-07-08 10:27:33 -04:00
Tomas Babej
4d85031b90
tests: Ensure tests are run with news.version set to 2.6.0
No tests were failing due to the footnote but its better to be safe than
sorry.
2021-10-02 18:06:12 -04:00
Tomas Babej
d81b999fa9 tests: Do not require line buffering
Test runner complains about it not being supported with binary files and
it does not look like it affects any tests in the first place anyway.
2020-11-21 12:27:05 -05:00
Tomas Babej
407d66d681 tests: Use updated Thread object API
Replace isAlive with is_alive as the former is no longer supported in
Python 3.9.
2020-11-21 12:27:05 -05:00
Martin Michlmayr
174507e7ad Fix typos 2020-11-17 10:41:13 -05:00
Tomas Babej
9b690fca57 tests: Improve bytes python3 compatibility 2019-01-01 20:11:13 -05:00
Tomas Babej
7c37940549 tests: Encode input data for the subprocess
Needed for Python2/3 compatibility.
2019-01-01 19:09:54 -05:00
Jakub Wilk
e36145b4fa Tests: Don't hardcode errno constants
The values of ENOENT and ESRCH are architecture-dependent, so don't
assume they're always 2 and 3.
2018-02-17 13:59:29 +01:00
Paul Beckingham
60220546c1 Tests: Removed taskd group features from test framework 2017-03-20 22:23:08 -04:00
Paul Beckingham
220aaf29f2 Test: Fixed bad typo in test framework 2016-11-06 01:12:56 -04:00
Paul Beckingham
d8bf209f29 Tests: Updated to non-deprecated Boolean values 2016-09-04 16:13:23 -04:00
Paul Beckingham
18c19ab9ed Framework: Added 'del_config' method to delete a config entry 2015-10-28 14:09:44 -04:00
Tomas Babej
9fe7993d96 tests: Add export_one and latest helpers to the Task test interface
- The 'export_one' method will export one task matching a filter,
  raising error if not exactly one task was matched.

- The 'latest' property will return the task matching the "+LATEST"
  filter.
2015-09-05 14:33:02 -04:00
Renato Alves
fe23510c51 Test: Drop default confirmation:off and correct tests accordingly 2015-07-28 19:57:18 +01:00
Renato Alves
3c7187d801 Tests: Create compat.py for Python 3 compatibility
Individual tests are not yet fully compatible with Python 3.
Some still have issues with I/O encoding/decoding. The painful part...
2015-07-24 15:29:41 +01:00
Renato Alves
341b528980 Tests: More Python 3 compatibility changes 2015-07-24 15:29:41 +01:00
Renato Alves
5691dd9c79 Tests: generalize MetaTest approach 2015-07-22 16:11:15 +01:00
Renato Alves
27b8cabac1 Test: Change most tests to use "add test" instead of split arguments 2015-07-17 19:14:33 +01:00
Renato Alves
6100933a28 BaseTest: Reorganize imports and make shlex global 2015-07-17 07:55:37 +01:00
Renato Alves
a3ea5cb412 Tests: \n on input= matters. Always include it 2015-07-10 18:08:46 +01:00
Renato Alves
a6312198e5 Test: t.runError can now also be called by passing a single string to be split 2015-07-03 22:31:47 +01:00
Renato Alves
d1d300fc69 basetest: Documentation clarification 2015-06-12 20:20:28 +01:00
Renato Alves
c3423243d8 Tests: Rename self.diag to self.tap and use self.t.diag where applicable
Having self.diag and self.t.diag was confusing as one referred to TAP
output (self.diag) while the other referred to "task diagnostics"
self.t.diag.

self.diag is now gone and was replaced by self.tap with the same
behavior.
2015-06-10 23:33:56 +01:00
Renato Alves
2962c0d99a Tests: Remove unnecessary imports and simplify template.t 2015-06-06 02:52:33 +01:00
Renato Alves
188fd4ba61 Tests: Accessory functions to create temporary files
These use tempfile.NamedTemporaryFile but allow execution without
raising "Text file busy".
The file is removed at exit (of the process) so no cleanup is necessary.
2015-06-05 14:13:07 +01:00
Wilhelm Schuermann
9e20f83f24 Tests: Implement export() for task access 2015-05-28 10:09:02 +02:00
Wilhelm Schuermann
65b6a35ef5 Tests: Make self.t('add proj:"with space" foo') work 2015-05-08 18:19:37 +02:00
Wilhelm Schuermann
f6e04585ae Tests: Add simpler self.t("add foo +bar") syntax 2015-05-05 20:28:10 +02:00
Renato Alves
ec9b8c5aa9 Tests: Force protocol to IPv4 on localhost 2015-05-03 15:52:12 +01:00
Renato Alves
fcfc95df86 Tests: Fix framework log collection error 2015-04-27 11:39:34 +01:00
Renato Alves
e60ea2e07a Revert "Tests: Use IP address instead of hostname with taskd"
Going back to using "localhost". Using the IP address causes GNUTLS
handshake errors in GnuTLS <= 3.2.18

This reverts commit 233d97fbff.
2015-04-26 18:13:20 +01:00
Renato Alves
931afb0674 Tests: Documentation on TASK/TASKD_USE_PATH 2015-04-26 17:46:44 +01:00
Renato Alves
7fcb26f363 Tests: Increase timeout to 5 seconds 2015-04-26 15:28:51 +01:00
Renato Alves
233d97fbff Tests: Use IP address instead of hostname with taskd 2015-04-26 00:24:59 +01:00
Renato Alves
64be230639 Tests: Include taskd in USE_PATH warning 2015-04-25 23:59:49 +01:00
Renato Alves
a52bba46f1 Output taskd.log to stdout on taskd failures (not test errors) 2015-04-25 23:51:01 +01:00
Renato Alves
afec6d451f Tests: Force stopping taskd on 5mins timeout 2015-04-06 13:46:08 +01:00
Renato Alves
fd17a68930 Tests: expose 'args' passed to hook scripts
- Useful to validate that all the expected arguments were passed with
  correct escaping.
- Update test/template.t with one use-case for 'args'
2015-04-06 13:43:41 +01:00
Renato Alves
09d86eb165 Tests: Better diagnostics on taskd start failure. 2015-04-06 13:08:17 +01:00
Renato Alves
d76d5c3587 Tests: Make sleeptime in wait_conditional an argument 2015-03-27 10:53:18 +00:00
Renato Alves
526665d4ec Tests: Configurable check for taskd readyness
* Also increase the frequency from 1/s to 2/s
2015-03-27 10:51:38 +00:00
Renato Alves
357850177d Tests: common/reusable variables live in basetest.utils 2015-03-27 10:14:44 +00:00
Renato Alves
180c382de2 Tests - Finer control on which binaries to look for on PATH
* It is now possible to control whether taskw and/or taskd are looked up
on the PATH by setting TASK_USE_PATH/TASKD_USE_PATH to "1"
2015-03-03 01:46:53 +00:00
Tomas Babej
75cf742a55 tests: Add taskrc_content property 2015-02-23 19:19:55 -05:00