# 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 test.util as util
import pwm.workspaces
import pwm.state
from pwm.config import config
    def test_windows_managed_workspace(self):
        wid = util.create_window()
        pwm.state.store()
        self.reset()
        pwm.state.restore()

        self.assertEqual(pwm.windows.managed[wid].workspace,
                         pwm.workspaces.workspaces[0])

    def test_workspace_windows(self):
        windows0 = pwm.workspaces.current().windows
        pwm.workspaces.switch(1)
        windows1 = pwm.workspaces.current().windows

        pwm.state.store()
        self.reset()
        pwm.state.restore()

        self.assertEqual(pwm.workspaces.workspaces[0].windows, windows0)
        self.assertEqual(pwm.workspaces.workspaces[1].windows, windows1)

    def test_focused(self):
        wid = util.create_window()

        pwm.state.store()
        self.reset()
        pwm.state.restore()
        self.assertEqual(pwm.windows.focused, wid)

    def test_current_workspace(self):

# 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_state.py
import unittest
import test.util as util
import pwm.workspaces
import pwm.state
from pwm.config import config

    def test_windows_managed_workspace(self):
        wid = util.create_window()
        pwm.state.store()
        self.reset()
        pwm.state.restore()

        self.assertEqual(pwm.windows.managed[wid].workspace,
                         pwm.workspaces.workspaces[0])

    def test_workspace_windows(self):
        windows0 = pwm.workspaces.current().windows
        pwm.workspaces.switch(1)
        windows1 = pwm.workspaces.current().windows

        pwm.state.store()
        self.reset()
        pwm.state.restore()

        self.assertEqual(pwm.workspaces.workspaces[0].windows, windows0)
        self.assertEqual(pwm.workspaces.workspaces[1].windows, windows1)

    def test_focused(self):
        wid = util.create_window()

        pwm.state.store()
        self.reset()
        pwm.state.restore()
        self.assertEqual(pwm.windows.focused, wid)

    def test_current_workspace(self):

        pwm.workspaces.switch(1)