Commit Graph

28 Commits

Author SHA1 Message Date
Foo 5a3e19847e Refactor shells test code
Tests passing locally:

bash (no)daemon C
busybox (no)daemon C
fish (no)daemon C
mksh (no)daemon C
rc (no)daemon C
tcsh (no)daemon C
zsh (no)daemon C
zsh zpython
ipython
pdf module
pdf subclass

dash has problems with job control (bgscript.sh not finished by kill)
2017-05-01 00:28:25 +03:00
Foo 959693fa97 Temporary fix for failing zsh tests 2015-08-22 18:05:07 +03:00
Foo 4a3798b43b Fix tcsh renderer: end prompt with a sequence that is not dropped 2015-03-01 17:25:03 +03:00
ZyX 3bf484de25 Break on self.quitting line
This may also cause python-3.2 pdb test to error out.
2015-02-21 19:55:39 +03:00
ZyX 0058919c2b Remove blank lines from pdb output
It is the problem that causes python-3.2 pdb tests to fail on travis.
2015-02-21 19:55:39 +03:00
ZyX deee40505d Do not repeat `if` more times then needed 2015-02-21 19:55:39 +03:00
ZyX f4e3c3099f Remove everything up until `class Foo(object):` in pdb tests
PyPy3 displays prompt two times on the line where `s` is present.
2015-02-01 12:13:56 +03:00
ZyX c3e541d16a Remove empty lines 2015-02-01 12:08:09 +03:00
ZyX 47dbdd571d Add pdb integration tests 2015-01-31 18:52:04 +03:00
ZyX 0a8e94d031 When using `rc` remove “read() failed” messages 2015-01-09 17:40:05 +03:00
ZyX cdfe6f03b2 Add support for running tests with debug Python versions
They are failing due to `[NNNN refs]` entries in daemon log and when switching 
modes in zsh without daemon, but who cares.
2014-12-05 23:09:21 +03:00
ZyX 1707f083e9 Modify postproc to make pypy tests work
Note: modification to test.sh is there because if running test outside of 
a virtualenv postproc.py will behave incorrectly.
2014-11-30 00:30:35 +03:00
ZyX 06211cbe63 Unify imports
Now imports follow the following structure:

1. __future__ line: exactly one line allowed:

        from __future__ import (unicode_literals, division, absolute_import, print_function)

   (powerline.shell is the only exception due to problems with argparse).
2. Standard python library imports in a form `import X`.
3. Standard python library imports in a form `from X import Y`.
4. and 5. 2. and 3. for third-party (non-python and non-powerline imports).
6. 3. for powerline non-test imports.
7. and 8. 2. and 3. for powerline testing module imports.

Each list entry is separated by exactly one newline from another import. If
there is module docstring it goes between `# vim:` comment and `__future__`
import. So the structure containing all items is the following:

    #!/usr/bin/env python
    # vim:fileencoding=utf-8:noet

    '''Powerline super module'''

    import sys

    from argparse import ArgumentParser

    import psutil

    from colormath.color_diff import delta_e_cie2000

    from powerline.lib.unicode import u

    import tests.vim as vim_module

    from tests import TestCase

.
2014-09-01 00:25:24 +04:00
ZyX 0af5e2d2ca Test mode support in fish
WARNING: Requires development version of fish. Since fish is not tested in
travis it is probably OK.
2014-08-24 17:14:37 +04:00
ZyX b9360a083a Make tests test powerline daemon with valid python and all clients 2014-08-23 15:19:00 +04:00
ZyX 89afac44bb Add support for PS2 and PS3 prompts outside of zsh 2014-08-12 08:04:35 +04:00
ZyX c403eef434 Add ipython shell tests 2014-08-06 17:18:42 +04:00
ZyX fed43e8af5 Run shell tests with and without daemon 2014-08-02 21:31:01 +04:00
ZyX 855e33274e Fix travis build: on travis “Terminated…” message is truncated 2014-07-20 02:00:56 +04:00
ZyX c3b4654bfb Fix flake8 complaints 2014-03-13 20:41:54 +04:00
ZyX c648178be0 Strip anything but prompt from tcsh tests
There are some problems with a number of spaces on travis: it differs. Cannot 
use the same code as for fish because output looks like

    {prompt}{spaces}^[0m ^[[{number}D

and both `{spaces}` and `{number}` differ on my machine and in travis.
2014-01-27 00:22:38 +04:00
ZyX e3bf63e55c Do not do needless copying in test_shells/test.sh 2014-01-26 21:30:01 +04:00
ZyX 6004403947 Another attempt to fix fish on travis 2014-01-23 07:45:35 +04:00
ZyX 2f98276ee0 Make postproc.py only leave fish prompt
Should fix fish tests
2014-01-23 07:36:54 +04:00
ZyX a590e100a2 Fix functional shell tests in travis
Hostname in travis contains random numbers meaning that it occasionally may 
contain a PID as well. Thus it must be replaced first.
2014-01-19 17:26:31 +04:00
ZyX 2b171cff67 Try to workaround problems with last line in travis 2014-01-18 01:59:19 +04:00
ZyX 56ef798218 On travis there are differences in CRs for some reason
This commit strips CRs from *.ok files and test output. Test failure used to be 
not recognized due to pipe: `cat -v` always succeeds meaning that `if ! diff 
… | cat -v` always succeeds too.
2014-01-17 21:34:18 +04:00
ZyX 0f0a5e92d3 Replace sed with python script
sed escaping is wrong: e.g. re.escape() will escape `+`, but with BRE escaped 
plus is quantifier
2014-01-13 22:37:33 +04:00