# Path: pwm/ffi/xcb.py
# class XcbError(Exception):
# class Cookie:
# class Xcb:
#     def __init__(self, error):
#     def __str__(self):
#     def __init__(self, name, value):
#     def __getattr__(self, name):
#     def reply(self):
#     def check(self):
#     def __init__(self):
#     def __getattr__(self, name):
#         def request(func, *args, **kwargs):
#     def connect(self, display=None):
#     def mask(self, masks):
# 
# Path: pwm/config.py
# class Config:
#     def __init__(self):
#     def load(self, default=False):
#     def _load_default(self):
#     def _ensure_config_exists(self, path):
#     def __getattr__(self, name):
# def setup_keys():
# def handle_key_press_event(event):
# def create_arguments(func):
#     def wrapper(*args, **kwargs):


import unittest
import pwm.bar
import pwm.workspaces
import pwm.windows
import test.util as util
from unittest.mock import create_autospec, patch
from pwm.ffi.xcb import xcb
from pwm.config import config
# Copyright (c) 2013 Michael Bitzi
# Licensed under the MIT license http://opensource.org/licenses/MIT




class TestWorkspace(unittest.TestCase):
    def setUp(self):
        util.setup()
        self.workspace = pwm.workspaces.current()
        self.workspace.tiling = create_autospec(self.workspace.tiling)
        self.workspace.floating = create_autospec(self.workspace.floating)
        self.workspace.fullscreen = create_autospec(self.workspace.fullscreen)

        self.tiling = self.workspace.tiling
        self.tiling.path.return_value = (0, 0)
        self.floating = self.workspace.floating
        self.fullscreen = self.workspace.fullscreen

    def tearDown(self):
        util.tear_down()

    def test_geometry(self):
        self.assertEqual(self.workspace.x, 0)
        self.assertEqual(self.workspace.y, pwm.bar.primary.height)
        self.assertEqual(self.workspace.width, xcb.screen.width_in_pixels)
        self.assertEqual(
            self.workspace.height,

# Path: pwm/ffi/xcb.py
# class XcbError(Exception):
# class Cookie:
# class Xcb:
#     def __init__(self, error):
#     def __str__(self):
#     def __init__(self, name, value):
#     def __getattr__(self, name):
#     def reply(self):
#     def check(self):
#     def __init__(self):
#     def __getattr__(self, name):
#         def request(func, *args, **kwargs):
#     def connect(self, display=None):
#     def mask(self, masks):
# 
# Path: pwm/config.py
# class Config:
#     def __init__(self):
#     def load(self, default=False):
#     def _load_default(self):
#     def _ensure_config_exists(self, path):
#     def __getattr__(self, name):
# def setup_keys():
# def handle_key_press_event(event):
# def create_arguments(func):
#     def wrapper(*args, **kwargs):


# Path: test/test_workspaces.py
import unittest
import pwm.bar
import pwm.workspaces
import pwm.windows
import test.util as util
from unittest.mock import create_autospec, patch
from pwm.ffi.xcb import xcb
from pwm.config import config

# Copyright (c) 2013 Michael Bitzi
# Licensed under the MIT license http://opensource.org/licenses/MIT




class TestWorkspace(unittest.TestCase):
    def setUp(self):
        util.setup()
        self.workspace = pwm.workspaces.current()
        self.workspace.tiling = create_autospec(self.workspace.tiling)
        self.workspace.floating = create_autospec(self.workspace.floating)
        self.workspace.fullscreen = create_autospec(self.workspace.fullscreen)

        self.tiling = self.workspace.tiling
        self.tiling.path.return_value = (0, 0)
        self.floating = self.workspace.floating
        self.fullscreen = self.workspace.fullscreen

    def tearDown(self):
        util.tear_down()

    def test_geometry(self):
        self.assertEqual(self.workspace.x, 0)
        self.assertEqual(self.workspace.y, pwm.bar.primary.height)
        self.assertEqual(self.workspace.width, xcb.screen.width_in_pixels)
        self.assertEqual(
            self.workspace.height,

            xcb.screen.height_in_pixels - pwm.bar.primary.height)