Commit graph

29 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
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
ryneeverett
3fdc6d3662 simpletap: simplify to use parent run method
Per the TODO, use `__init__` to override the stream. There don't seem to
be any other substantial changes to the `run` method needed for TAP and
I'm assuming the additional code in the upstream `run` has been added
since this class was written.

My primary motivation was to set `result.buffer = self.buffer` in the
`run` method, which fixes the runner enough to be able to use
`breakpoint()`.

In addition, I updated the shebang in `tw-2189.t` for portability.
2023-01-30 18:33:42 -05:00
Tomas Babej
0bc92d6115
meta: Adjust copyright headers 2021-09-05 12:02:07 -04:00
Tomas Babej
9017cd6e53
doc: Update copyright to 2021 2021-01-02 02:48:22 -05:00
Tomas Babej
095d51e479
tests: Properly label and detect unexpected successes
Unexpected successes were being labeled as failures, which might be
related to [1]. This behaviour is indeed welcome - we want to detect if
tests are unexpectedly succeeding via test pipeline failures, however,
the current implementation of the simpletap did not properly implement
this.

[1] https://bugs.python.org/issue20165
2020-12-05 19:28:47 -05:00
Tomas Babej
a09f9d48ab Update copyright to 2020 2020-11-21 12:27:05 -05:00
Tomas Babej
8066e4e6e2 meta: Update copyright year 2019-01-01 08:46:21 -05:00
Simon Ruderich
e817dfc800 Always use https:// link for opensource.org
It was already used in a few places, make this consistent.
2018-03-04 14:53:07 +01:00
Paul Beckingham
0de169bb10 Copyright 2018 2017-12-31 19:22:07 -05:00
Paul Fenwick
5ec91026ed Improve TAP compliance in test suite
This allows tools like `prove` to operate on our test-suite, allowing us
to do things like run recently-failing tests first, randomising test
order, and fancier reporting options.

Changes made:

- TAP output always goes to STDOUT, never to STDERR
- Skipped tests signaled as `ok 1 # skip` as per standard
- Expected failures signaled as `not ok 1 # TODO` as per standard
- `.prove` added to .gitignore
2017-12-02 12:06:54 -05:00
Paul Beckingham
a50e65a134 Copyright update 2017-01-01 12:30:04 -05:00
Paul Beckingham
641d232dea Copyright: Updated to 2016 2015-12-31 15:06:43 -05:00
Renato Alves
52746e8504 TAP: Don't fail on errors during setUpClass 2015-07-23 17:42:41 +01:00
Renato Alves
ce378c8f62 TAP: When test description is undefined, don't include __main__ in output 2015-07-03 21:53:12 +01:00
Renato Alves
a3bbef3682 TAP: Show name of file containing the test(s)
In addition to the state of the test the description now includes the
location of the test, i.e. the filename that contains it.
Useful in central.tasktools.org.
2015-07-03 19:26:30 +01:00
Renato Alves
53f7786da5 Simpletap: Handle "Unexpected success" cases
When a test decorated with @expectedFailure unexpectedly passes, fail
that test until the decorator is removed.
2015-06-22 17:32:46 +01:00
Renato Alves
bd3cce7d4b simpletap: Show more information in expected failures 2015-06-11 23:35:07 +01:00
Renato Alves
1302e69d51 Expected failures are now treated as skipped tests
Before they were being treated as "passing" tests.
Since this might cause them to be silently ignored, classifying them
under "skipped" will ensure they won't go unnoticed.

Expected failures != skipped. The former will always be executed.
2015-05-25 18:15:31 +01:00
Renato Alves
cd216bd4fd simpletap - Add color to test state when running on tty 2015-03-12 20:49:50 +00:00
Renato Alves
ac4a5c6d62 simpletap - Include scenario for expected failures
* Expected failures are treated as "ok" followed by a report of what went wrong
2015-03-12 20:00:02 +00:00
Paul Beckingham
b7ad091d00 Updated copyright to 2015 2015-01-01 00:00:41 -05:00
Renato Alves
18581a6ca4 Unittest - Avoid second exception on framework tracing error
* Prevents masking of the initial exception due to a second one.
2014-10-18 01:29:01 +01:00
Renato Alves
07cd033cbc Unittest - Readability and information improvements with test failures 2014-07-24 16:07:58 +01:00
Renato Alves
f39617a753 Unittest - Fix newlines should be interpreted in printed output 2014-07-24 13:10:44 +01:00
Renato Alves
3fd06257b7 Unittest - Buffer stdout/stderr until after test status is printed 2014-07-18 20:06:29 +01:00
Renato Alves
7cc4775060 Unittest - Properly comment output lines in TAP format 2014-07-15 15:56:26 +01:00
Renato Alves
d419fb9560 Unittest - Don't escape new-line characters in TAP output 2014-07-14 11:44:28 +01:00
Renato Alves
112d4bfb14 Improvement TW-1255
- #TW-1255 New testing framework (thanks to Renato Alves).

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2014-02-09 20:10:24 -05:00