Commit Graph

59 Commits

Author SHA1 Message Date
Foo 19f9885825 Fix python tests by abstracting away default theme name 2016-10-29 15:58:53 +03:00
S0lll0s ee5f471b49 Deprecate "bar" bindings in favor of lemonbar 2016-01-08 19:30:49 +01:00
ZyX 1e7dc7900d Fix issues found in 1256 pull request
Ref #1256
2015-01-25 12:51:19 +03:00
S0lll0s dd77d420a3 Add BAR (bar ain't recursive) renderer and fitting i3 bindings 2015-01-25 12:26:13 +03:00
ZyX 332a266d87 When testing Vim do not rely on test order and do not save state
This commit refactors `TestVim` test class in test_configuration so that

1. `test_environ_update` does not leave state (value of `powerline_config_paths` 
   global Vim variable) behind other tests can use.
2. `test_local_themes` does not rely on state left from `test_environ_update`, 
   instead using new facility for providing needed value of 
   `Powerline.get_config_paths` call. This facility will be used later in BAR 
   tests.

Ref #1256
2015-01-25 01:58:27 +03:00
ZyX 654d4690fc Remove all segments from powerline.segments.common
Ref #1092
2015-01-06 17:01:48 +03:00
ZyX c868f9c255 Rename `attr` to `attrs`
Fixes #1199
2015-01-06 16:05:01 +03:00
ZyX 8d05003849 Rename `highlight_group` key to `highlight_groups`
Ref #1199
2015-01-06 15:57:49 +03:00
ZyX 033422aff2 Add tests for various shell escapes variants 2014-12-06 16:53:00 +03:00
ZyX fa217185cf Encode vim statusline to &encoding before returning
Partially fixes #1072
2014-09-14 14:26:42 +04:00
ZyX 05cb133dd4 Replace g:powerline_config_path Vim variable with …_paths list
This is for consistency with other powerline bindings that now all do have a way 
to specify a list of paths.
2014-09-05 22:13:51 +04:00
ZyX c5ca1b23c4 Use class setup/teardown methods to use vim module mock 2014-09-05 20:00:19 +04:00
ZyX 7bf025ca2b Add `exclude_/include_function` support
This is first step towards fixing #1046.
2014-09-05 20:00:19 +04:00
ZyX bc557bd656 Use replace_item to add module `bar` to sys.modules
Tests should not leave modified environment.
2014-09-04 21:38:49 +04: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 2505d0b827 Implement segment truncation
Closes #161 (requires implementation for specific segments though)
2014-08-30 18:22:52 +04:00
ZyX d6c603daf0 Add support for `segment.expand`
Closes #154
2014-08-30 18:22:46 +04:00
ZyX bfa335d96a Fix typo in test_configuration.py 2014-08-30 17:59:58 +04:00
ZyX 41476544ca Replace `name` and `module` keys with `function` key
Fixes #1031
2014-08-29 23:13:10 +04:00
ZyX 356cb43ea2 Add `powerline_segment_datas` attribute
Fixes #1035
2014-08-29 20:17:23 +04:00
ZyX 075eb8420e Add tests 2014-08-21 23:32:43 +04:00
ZyX 88a0b9075c Remove unused vim import 2014-08-21 23:32:43 +04:00
ZyX 1afab26cec Test that VimPowerline.add_local_theme works 2014-08-12 20:48:49 +04:00
ZyX bdde4ae99f Implement theme hierarchy
Fixes #783
2014-08-06 00:05:04 +04:00
ZyX 0f4e1bafda Refactor config_mock module to not use globals and fix tests 2014-08-05 13:56:02 +04:00
ZyX 16c01e8d64 Add support for display option 2014-08-02 18:37:22 +04:00
ZyX a279ea236c Also check error messages 2014-07-26 01:46:54 +04:00
ZyX f5735148e8 Add group aliasing and colorscheme hierarchy tests 2014-07-12 14:22:23 +04:00
ZyX 3ebf9c1a81 Use highlighted_string function to define segments 2014-07-12 14:08:05 +04:00
ZyX 576971c5f1 Fix test class name in test_configuration 2014-07-12 13:48:04 +04:00
ZyX c570a98065 Add watcher option
Ref #818
2014-06-28 21:10:15 +04:00
ZyX 6f6c1fb90c Add tests 2014-06-25 20:05:24 +04:00
ZyX 515df615bf Add some basic tests 2014-06-24 23:36:50 +04:00
ZyX f02807ffa4 Rename test_configuration to test_provided_config_files 2014-06-24 21:38:07 +04:00
ZyX 5c33de7a24 Also test zsh local themes 2014-02-16 20:52:22 +04:00
ZyX 73d7b0db08 Add functional tests for plugin themes 2014-01-11 11:51:58 +04:00
ZyX 4f80468645 Fix tests broken due to jobnum introduction 2014-01-10 23:17:06 +04:00
Kim Silkebækken 74d4ee9669 Update tests
Unit tests are not run on external segments. When external segments are
moved out of the core repo the extra test code won't be needed.
2013-08-20 16:48:54 +02:00
ZyX 962a1b6fc2 Fix tests 2013-05-19 13:17:59 +04:00
ZyX dfaf8c3b3a Fix messages 2013-05-19 13:17:58 +04:00
ZyX ebd122d4ac Unfinished attempt to adapt tests to new code 2013-05-19 13:17:58 +04:00
ZyX 467bc53589 Also fix bash tests 2013-05-02 16:01:44 +04:00
Kim Silkebækken 7864acb70b Update tests 2013-04-11 11:52:54 +02:00
ZyX 3ebc16a48c Replace pl.environ/getcwd/home with segment_info 2013-03-30 21:55:00 +04:00
ZyX 7646c949e2 Automatically reload configuration
Needs testing
2013-03-25 18:24:17 +04:00
ZyX 80ddbfbf9a Split Powerline.__init__ into __init__ and create_renderer
Target: with long-living Powerline objects periodically reload configuration 
recreating renderer. Use file watchers to watch for configuration. Configuration 
should be able to be safely reloaded in non-blocking mode in a separate thread 
up to the time when it comes to recreating renderer.

This commit does not add anything that actually reloads the configuration, 
multiple runs of .create_renderer were not tested.
2013-03-25 18:24:16 +04:00
ZyX ed435f8063 Add required pl argument to segments
Fixes #340
Ref #330
2013-03-24 19:44:01 +04:00
ZyX c4e5ff8b49 Added support for all powerline prompts (in2, out, rewrite)
Also fixed problem with prompt not really updating.

Fixes #141
2013-03-24 05:23:33 +04:00
ZyX b1f9edab4c Remove get_segment_info and passing segment_info through globals 2013-03-24 05:23:33 +04:00
ZyX 260a0dafcb Add tests for the constantly recreated *Powerline instances 2013-03-19 00:42:32 +04:00