summaryrefslogtreecommitdiff
path: root/tests/commands/global_test.py
Commit message (Collapse)AuthorAge
* Move mock ui creation to function.Thomas Nixon2018-02-19
|
* Add test: template not decoded properly.Julian Mehne2018-02-15
|
* commands/globals: Only set stdin to a pipe if there is dataDylan Baker2017-08-23
| | | | | | | | | | Otherwise the editor will crash. I can't figure out for the life of me to test this. I thought that I would be able to do something like detect if stdin is a tty or something else, but that doesn't seem to work. Fixes #1137
* tests/commands/globals: Add tests for stdin handlingDylan Baker2017-08-23
|
* tests/commands/global: Fix testsDylan Baker2017-08-23
| | | | | These tests were wrong they would always pass, even if the code underneath was broken. With this fix they actually work.
* tests/commands/globals: Add tests for ExternalCommand when spawningDylan Baker2017-08-23
|
* tests/commands/global: Test ExternalCommand when not spawningDylan Baker2017-08-23
| | | | | | This doesn't test the spawn path, which is a little bit more complicated since it's running code in a thread instead of in the main thread.
* commands: Don't try to sign_by_default without a gpg keyDylan Baker2017-08-11
| | | | | | Currently it's possible to set sign_by_default without setting a default key. This is obviously not a good plan for all sorts of reasons. This fixes the two failing tests from the last commit.
* tests: Add a couple of tests for the commands/global moduleDylan Baker2017-08-11
This adds tests to exercise #1110. These tests operated on a twisted async method, based on the inlineCallbacks decorator (which creates a deferred, but looks like synchronous code). The tests therefore have to use twisted's trial module for unittest. These seem to operate mostly correctly using the standard python unittest runner, pass and fail work right, but expected failure does not. Instead of an expected failure, you get pass. I really am not impressed with trial. After several hours of mucking with it I never got it to run any tests, just spit out errors or do nothing. pytest can run these tests just fine, and if we're going to change test runner I'll again say that pytest is much nicer to work with.