# Path: tilenol/xcb/core.py
# class Rectangle(namedtuple('_Rectangle', 'x y width height')):
#     __slots__ = ()


import unittest
    import mock
    from unittest import mock  # builtin mock in 3.3
from tilenol.xcb import Rectangle
        from tilenol.layout.examples import Tile
        from tilenol.layout import Split, Stack, TileStack
        from tilenol.layout import Split, Stack, TileStack
        lay.layout()
        w1.set_bounds.assert_called_with(Rectangle(0, 0, 600, 600))
        w2.set_bounds.assert_called_with(Rectangle(600, 0, 200, 600))
        w1.reset_mock()
        w2.reset_mock()
        w3 = self.wmock()
        lay.add(w3)
        lay.layout()
        w1.set_bounds.assert_called_with(Rectangle(0, 0, 600, 600))
        w2.set_bounds.assert_called_with(Rectangle(600, 0, 200, 300))
        w3.set_bounds.assert_called_with(Rectangle(600, 300, 200, 300))

    @mock.patch('tilenol.event.Event')
    def testPixels(self, event):
        class Tile(Split):
            class left(TileStack):
                size = 128
                limit = 1
            class right(TileStack):
                weight = 2
                min_size = 300
        lay = Tile()
        lay.set_bounds(Rectangle(0, 0, 800, 600))
        w1 = self.wmock()
        lay.add(w1)
        w2 = self.wmock()
        lay.add(w2)
        lay.layout()
        w1.set_bounds.assert_called_with(Rectangle(0, 0, 128, 600))
        w2.set_bounds.assert_called_with(Rectangle(128, 0, 672, 600))

# Path: tilenol/xcb/core.py
# class Rectangle(namedtuple('_Rectangle', 'x y width height')):
#     __slots__ = ()


# Path: tests/layouts/test_tile.py
import unittest
    import mock
    from unittest import mock  # builtin mock in 3.3
from tilenol.xcb import Rectangle
        from tilenol.layout.examples import Tile
        from tilenol.layout import Split, Stack, TileStack
        from tilenol.layout import Split, Stack, TileStack

        lay.layout()
        w1.set_bounds.assert_called_with(Rectangle(0, 0, 600, 600))
        w2.set_bounds.assert_called_with(Rectangle(600, 0, 200, 600))
        w1.reset_mock()
        w2.reset_mock()
        w3 = self.wmock()
        lay.add(w3)
        lay.layout()
        w1.set_bounds.assert_called_with(Rectangle(0, 0, 600, 600))
        w2.set_bounds.assert_called_with(Rectangle(600, 0, 200, 300))
        w3.set_bounds.assert_called_with(Rectangle(600, 300, 200, 300))

    @mock.patch('tilenol.event.Event')
    def testPixels(self, event):
        class Tile(Split):
            class left(TileStack):
                size = 128
                limit = 1
            class right(TileStack):
                weight = 2
                min_size = 300
        lay = Tile()
        lay.set_bounds(Rectangle(0, 0, 800, 600))
        w1 = self.wmock()
        lay.add(w1)
        w2 = self.wmock()
        lay.add(w2)
        lay.layout()
        w1.set_bounds.assert_called_with(Rectangle(0, 0, 128, 600))
        w2.set_bounds.assert_called_with(Rectangle(128, 0, 672, 600))

        lay.set_bounds(Rectangle(0, 0, 400, 300))