File: test_appdirs.py

package info (click to toggle)
python-easydev 0.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 504 kB
  • sloc: python: 2,130; javascript: 49; makefile: 13
file content (26 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import mock

def test_app():

    def getter(app):
        app.user_data_dir
        app.site_data_dir
        app.user_config_dir
        app.site_config_dir
        app.user_cache_dir
        app.user_log_dir

    with mock.patch("sys.platform", "darwin"):
        from easydev import appdirs
        app = appdirs.AppDirs("test")
        getter(app)

    with mock.patch("sys.platform", "win32"):
        from easydev import appdirs
        app = appdirs.AppDirs("test")
        getter(app)

    with mock.patch("sys.platform", "linux"):
        from easydev import appdirs
        app = appdirs.AppDirs("test")
        getter(app)