Commit Graph

27 Commits

Author SHA1 Message Date
Foo 19f9885825 Fix python tests by abstracting away default theme name 2016-10-29 15:58:53 +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 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 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 621eb8412d Fix tests 2014-07-12 12:20:40 +04:00
ZyX 97266b7ffc Initial support for #770
What was done:
- Implemented loading using configuration hierarhy as proposed in the issue
- Implemented group aliasing

What was not:
- Some tests (config_reload) are failing
- Other (test_configuration) are spamming console with unexpected messages
- No support for powerline-lint
- No tests for new functionality
- Specifically I have not checked whether group aliasing actually works
- Colorschemes were not ported

Some other things: I have named this branch `config-ng` because I have other
ideas about configuration and it would be good to include them making only one
possibly backwards-incompatible merge commit instead of many. Specifically I am
going to rebase `merge-config` branch here.
2014-07-12 12:20:40 +04:00
ZyX c570a98065 Add watcher option
Ref #818
2014-06-28 21:10:15 +04:00
ZyX 515df615bf Add some basic tests 2014-06-24 23:36:50 +04:00
ZyX d85ae963c3 Sleep more 2014-01-30 09:00:33 +04:00
ZyX-I a4e8f36f36 Merge pull request #706 from ZyX-I/better-errors
Better error handling
2014-01-26 10:43:16 -08:00
ZyX bb343765b0 Add powerline: exception prefix 2014-01-26 22:45:11 +04:00
ZyX bb0d9028f1 Make sure watcher is not used 2013-11-21 00:23:25 +04:00
ZyX 95d13a334a Test that nothing is reloaded with run_once=True 2013-11-21 00:18:34 +04:00
ZyX b1fecebd53 Some fixes for flake8 2013-04-06 18:56:19 +04:00
ZyX d1d05c9dcf Add support for reloading configuration in the main thread 2013-04-06 18:09:45 +04:00
ZyX 88865b1145 Defer create_renderer (and thus thread creation) until .render call
May fix problem discussed in #397

Also fix documentation for Powerline.render().
2013-04-06 17:18:59 +04:00
ZyX af2f8f588b Replace MultiClientWatcher and Powerline threads with ConfigLoader
Also
- move file opening and parsing to ConfigLoader
- add interval configuration
2013-04-06 17:18:25 +04:00
ZyX 33d32498b9 Do not use create_renderer from a separate thread
Also moves functions from tests.test_config_reload to tests.lib.config_mock

Using create_renderer for vim results in vim access from a separate thread.
2013-04-03 06:33:56 +04:00
ZyX b990c920e9 Use clear_events, do not assert. 2013-04-03 06:02:14 +04:00
ZyX de47b76a06 Add more assertAccessEvents
May fix travis build
2013-04-02 19:23:12 +04:00
ZyX b7c61f8bf6 Handle removed and then added files
Note: if user configuration was removed, but global configuration was not it 
will start tracking global configuration file for changes.
2013-04-02 00:27:54 +04:00
ZyX d1e79000b5 Add tests for reloading theme and colorscheme 2013-03-31 14:57:43 +04:00
ZyX 54471569ab Check whether it switches configuration fine 2013-03-31 14:53:21 +04:00
ZyX 8c3be65bba Added test for colors config reloading 2013-03-31 13:37:07 +04:00
ZyX 5a50acf16b Add initial tests for configuration reloading
Currently only:
- Test for not reloading configuration if run_once is not True
- Test for reloading main configuration and other configurations triggered by 
  changes in main configuration file

TODO: tests for all other configuration files reloading (colors, colorscheme, 
      theme).
2013-03-31 00:06:49 +04:00