Commit graph

819 commits

Author SHA1 Message Date
Tomas Janousek
3edeef5960 tests: Report details about failed assertions in tests.base 2020-07-02 09:51:56 -04:00
Tomas Janousek
1cb822455c tests: Drop some (hopefully) unnecessary sleeps
vimrunner.Server.remote_expr waits for the result so we don't need to
sleep, except perhaps if vim does something asynchronously?
Anyway, this doesn't seem to break any tests here, and is noticeably
faster.
2020-07-02 09:51:56 -04:00
Tomas Janousek
c8c3cc9a00 tests: Fix misquoted g:vimwiki_list setting
vimrunner.Client.command doesn't do any escaping so we can only use
double quotes. Otherwise it does this:

    self.server.remote_expr(["VimrunnerPyEvaluateCommandOutput('let g:vimwiki_list = [{'syntax': 'mediawiki', 'ext': '.txt','path': '/tmp/tmpl1hh2nnf'}]')"])
    E449: Invalid expression received: Send expression failed.
2020-07-02 09:51:56 -04:00
Tomas Janousek
6609c541eb tests: Fix typo varialbes → variables 2020-07-02 09:51:56 -04:00
Tomas Janousek
c2627a14ad tests: Fix PEP 8 warnings in base.py 2020-07-02 09:51:56 -04:00
Tomas Janousek
026d5833be tests: Fix read-only pytest cache directory
We're mounting taskwiki read-only (because the docker container runs as
root) so place the pytest cache elsewhere. This means re-running failed
test isn't possible now. If that is desired, we may run the container as
current user (may require libnss-unknown) instead, later.
2020-07-02 09:51:56 -04:00
Tomas Janousek
e044ebdd02 tests: Pass $PYTEST_FLAGS to pytest
This makes it easier to pass "-s" or "-k TestSomething" when running
"make test".
2020-07-02 09:51:56 -04:00
Tomas Janousek
47922faeee tests: Launch Xvfb with -noreset
An attempt to fix the sporadic "E233: cannot open display" that I'm
still seeing.
2020-07-02 09:51:56 -04:00
Tomas Janousek
c0285cceef tests: Move CMD from Dockerfile to docker-compose.yml
This makes it easier to change the command (e.g. to add `-s`) as we
don't need to tell docker-compose to rebuild the image and container.
2020-07-02 09:51:56 -04:00
Tomas Janousek
09b6617791 tests: Fix E233: cannot open display
Apparently xvfb-run can only be run a few times in a long-lived
container. :-/
2020-07-02 09:51:56 -04:00
Tomas Janousek
21889a2be2 tests: Include xvfb into the Docker image 2020-07-02 09:51:56 -04:00
Tomas Janousek
24c2a8266b Revert "check for python version 3.7 and 3.8 as well"
This reverts commit 7b823ace5b.

Python in Travis is only used to merge the coverage results (in fact,
not even that, as those results never get out of the docker image), it
doesn't affect the tests in any way.
2020-07-02 09:51:56 -04:00
djugei
8c4da3a744 fixed another is not 2019-12-01 15:11:43 -05:00
beuerle
4620771837 fix python 3.8 error about "is not" with literal 2019-11-28 12:27:18 -05:00
beuerle
7b823ace5b check for python version 3.7 and 3.8 as well 2019-11-16 22:55:37 -05:00
beuerle
10278639f9 fix python 3.8 error about "is not" with literal
After updating python to 3.8 the following error pops up when entering
vimwiki:

```
"~/vimwiki/README.md" 63L, 1510C
Error detected while processing ~/dotfiles/vim/bundle/taskwiki/ftplugin/vimwiki/taskwiki.vim:
line   33:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "~/dotfiles/vim/bundle/taskwiki/taskwiki/main.py", line 640, in <module>
    WholeBuffer.update_from_tw()
  File "~/dotfiles/vim/bundle/taskwiki/taskwiki/errors.py", line 26, in wrapped_function
    original_function(*args, **kwargs)
  File "~/dotfiles/vim/bundle/taskwiki/taskwiki/decorators.py", line 9, in wrapped_function
    vim.command('let save_pos = getpos(".")')
vim.error: Vim:~/dotfiles/vim/bundle/taskwiki/taskwiki/short.py:41: SyntaxWarning: "is not" with a literal. Did you mean "!="?
```

Changing from `is not` to `!=` solves this issue.
2019-11-16 22:55:37 -05:00
mrossinek
719ab0d59a Add tags to .gitignore
Ignores helptags file generated by vim in the docs directory as well as
a potential ctags file in the project root.
2019-11-16 22:54:12 -05:00
Abhinav Gupta
08480810ec Document taskwiki_markup_syntax
This documents the taskwiki_markup_syntax setting added in #192.

Ref: https://github.com/tbabej/taskwiki/issues/165#issuecomment-432211801
2019-07-14 21:52:21 -04:00
Tomas Babej
056d9e82f5
LICENCE: Update copyright years 2019-03-26 11:18:20 -04:00
Florian Heiderich
37f6201ef1 replace deprecated base64.decodestring
by base64.decodebytes
2019-03-18 17:00:21 -04:00
Florian Heiderich
a2723a0136 replace deprecated base64.encodestring
by base64.encodebytes
2019-03-18 17:00:21 -04:00
Florian Heiderich
1f291caa6c add "taskwiki" as argument for :helptags 2019-03-01 11:50:02 -05:00
mrossinek
97bfa1315c
Add unit tests to test fix of #182 (allow colon remap) 2019-02-24 12:08:54 -05:00
mrossinek
504aefadef
Add unit tests for default, suppressed and custom mappings 2019-02-24 12:08:52 -05:00
mrossinek
c5310126fa
Change mappings to disallow remaps (fixes #182) 2019-02-24 12:02:13 -05:00
mrossinek
879853becc
Add maplocalleader option 2019-02-24 12:02:12 -05:00
mrossinek
e82813e03b
Add mapping-suppressing option 2019-02-24 12:01:54 -05:00
Tomas Babej
b9db0fcfd3
travis: Change X11 permissions 2019-02-22 21:50:28 -05:00
Tomas Babej
6f62e750cb
tests: Add access to the host X11 socket 2019-02-22 21:00:44 -05:00
Tomas Babej
e049f45ae9
Makefile: Propagate the error codes 2019-02-22 20:59:44 -05:00
Marco Hinz
eaffcbd718 Nvim doesn't imply Python support
`has('python')` and `has('python3')` work the same in Vim and Neovim, so there's
no need for that extra check. That check is even wrong, since Nvim's `:python`
and friends won't work either as long as the Python provider isn't installed as
well.
2019-01-12 00:03:41 -05:00
Bodo Graumann
f4f1fe2b2e Add documentation for list bullet symbol
Add a note in the documentation about how we only consider the asterisk
check lists.

Fixes tbabej#197.
2019-01-01 15:51:34 -05:00
Tomas Babej
0177912443 Remove extra package 2018-12-31 20:13:21 -05:00
DancingQuanta
d389088fb7 Modified preset to use cache.markup_syntax 2018-10-18 01:00:29 -04:00
DancingQuanta
65799431a1 Modified viewport's parse_line to use cache.markup_syntax to select markup 2018-10-18 01:00:29 -04:00
DancingQuanta
6bee0144d8 extra-syntaxes: Initialize syntax during TaskCache object initialization
Since markup syntax initialization is crucial to having a working TaskCache
object, it should happen as part of the __init__ function. Also, this is
more consistent with the already existing sourcing of other taskwiki
specific Vim variables.
2018-10-18 01:00:29 -04:00
DancingQuanta
09f01333be Extra-syntaxes: Added Markdown parser 2018-10-18 01:00:29 -04:00
DancingQuanta
8d8fd2c20b Implemented multIi-markup tests in vim of viewport and preset 2018-10-18 01:00:29 -04:00
DancingQuanta
159d5c4b79 Implemented multi-markup parsing tests for viewport and preset 2018-10-18 01:00:29 -04:00
DancingQuanta
920c065d98 extra-syntaxes: First of test suite of extra syntaxes using HEADER macro with test_syntax_parsing 2018-10-18 01:00:29 -04:00
Brett Kosinski
ca3f5c844c Add support for vim8 terminal.
Taskwiki already supports the Neovim terminal when executing "task
edit", but otherwise assumes that command doesn't exist and falls back
to using "!".

Unfortunately, for users of non-terminal Vim instances, TaskWikiEdit
doesn't work, as "!" doesn't provide a fully functioning terminal,
leading to visual corruption.

Fortunately, vim8 now comes with a compatible implementation of that
command.

Here we extend the 'terminal' detection to check for either Neovim or
Vim8.
2018-09-02 20:42:03 -04:00
Tomas Babej
fe4f44bcf9
travis: Use makefile target 2018-07-31 04:54:10 -04:00
Tomas Babej
b00e886142
tests: Use explicit coverage tracking 2018-07-31 03:46:58 -04:00
Tomas Babej
a331fd0f3b
docker: Accept TASK_VERSION argument 2018-07-31 02:39:53 -04:00
Tomas Babej
d7fd4177a6
travis: test 2018-07-31 02:20:19 -04:00
Tomas Babej
9a91b5de32
tets: Pass along the exit code 2018-07-31 02:20:17 -04:00
Tomas Babej
846b71bc26
docker: Install mnemosyne to pull in graphics deps 2018-07-31 01:43:52 -04:00
Tomas Babej
af6b495fd9
travis: Specify docker service 2018-07-31 01:43:36 -04:00
Tomas Babej
ddf42293c3
travis: Execute docker container as sudo 2018-07-31 00:39:54 -04:00
Tomas Babej
b9878fad11
travis: No point to test container twice 2018-07-31 00:34:39 -04:00