Commit Graph

10 Commits

Author SHA1 Message Date
ZyX 9ae76a9971 Use UCS2 Python versions for running tests 2015-01-02 15:23:44 +03:00
ZyX 92b75aa951 Also catch INotifyError when testing tree watcher 2014-09-14 19:26:37 +04:00
ZyX 4e91f18908 Run watcher tests with bytes() arguments 2014-09-14 19:26:36 +04:00
ZyX fb022b7917 Check that exception from watcher has errno attribute equal to ENOENT 2014-09-07 23:23:23 +04:00
ZyX b638a8e1c9 Add tests for is_watching method
Currently they fail for uv-based watcher.
2014-09-02 21:58:42 +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 8d3376ce07 Ultimately disable pyuv watcher tests 2014-08-30 15:49:50 +04:00
ZyX 560600fca9 Use shutil.rmtree in tests 2014-08-30 15:47:31 +04:00
ZyX 0ee5293e1a Add tests for libuv-based watcher
Four possible results of running tests (first three are errors):

- “The change to inotify/file2 was not detected” on line 84: most common
- “Spurious change detected” at line 82 (uncommon, usually fixed by sleeping
  before running test in do_test_for_change)
- “The change to inotify was not detected” in tree watcher test (e.g. from line
  131) (very rare)
- All OK.
2014-08-30 15:45:30 +04:00
ZyX cb99c06027 Move watcher tests into a separate file 2014-08-16 15:06:57 +04:00