Unit Tests (test_quicktile.py)

Unit Test Suite for QuickTile using Nose test discovery

class TestHelpers(methodName='runTest')[source]

Tests for loose functions

test_clamp_idx()[source]

Test that clamp_idx(wrap=False) saturates as expected

Return type

None

test_clamp_idx_default()[source]

Test that clamp_idx defaults to wrapping behaviour

test_clamp_idx_wrap()[source]

Test that clamp_idx(wrap=True) wraps as expected

Return type

None

test_euclidean_dist()[source]

euclidean_dist: basic functionality

Return type

None

test_powerset()[source]

Test that powerset() behaves as expected

Return type

None

test_xiniterror_str()[source]

XInitError.__str__ output contains provided text

Return type

None

class TestRectangle(methodName='runTest')[source]

Tests for my custom Rectangle class

setUp()[source]

Implicitly test positional and keyword construction during setup

test_bool()[source]

Rectangle: only truthy if area is nonzero

test_contains()[source]

Rectangle: __contains__

test_float_input()[source]

Rectangle: test truncating of float inputs to integers

test_gdk_round_tripping()[source]

Rectangle: from_gdk/to_gdk

test_gravity_conversion()[source]

Rectangle: basic gravity conversions

test_gravity_noop()[source]

Rectangle: gravity conversions on top-left corner are no-ops.

Return type

None

test_gravity_rounding()[source]

Rectangle: gravity conversions truncate predictably

test_intersect()[source]

Rectangle: intersection

test_member_access()[source]

Rectangle: quacks like a namedtuple

test_moved_into()[source]

Rectangle: moved_into

test_moved_off_of()[source]

Rectangle: moved_off_of

test_negative_size()[source]

Rectangle: test normalization of negative sizes

test_none_safe()[source]

Rectangle: __new__ doesn’t attempt to compare None and int

test_properties()[source]

Rectangle: convenience properties

test_rel_conversion_symmetry()[source]

Rectangle: converting to/from relative coordinates is symmetrical

test_relative_conversion_basic()[source]

Rectangle: converting to/from relative coordinates works

test_righthand_construction()[source]

Rectangle: test construction using x2/y2 and width/height

test_subtract()[source]

Rectangle: subtract

test_to_point()[source]

Rectangle: to_point

test_two_point_form()[source]

Rectangle: two-point-form properties function properly

test_twopoint_construction()[source]

Rectangle: test construction using two-point form

test_union()[source]

Rectangle: union finds bounding box for two rectangles

class TestStrutPartial(methodName='runTest')[source]

Tests for my custom _NET_WM_STRUT_PARTIAL wrapper class

test_as_rects()[source]

StrutPartial: as_rects (basic function)

test_as_rects_pruning()[source]

StrutPartial: as_rects doesn’t return empty rects

test_construction()[source]

StrutPartial: construction

class TestUsableRegion(methodName='runTest')[source]

Tests for my per-monitor _NET_WORKAREA calculation class

test_bool()[source]

UsableRegion: __bool__

test_clip_to_usable_region()[source]

UsableRegion: clip_to_usable_region

test_find_monitor_for()[source]

UsableRegion: find_monitor_for

test_issue_108()[source]

UsableRegion: windows use of space left free by narrow panels

Regression test for #64, #65, and #108.

test_issue_45()[source]

UsableRegion: struts on internal monitor edges work properly

(Test that the ambiguous aspect of the spec is interpreted in accordance with how Unity actually implemented it.)

test_move_to_usable_region()[source]

UsableRegion: move_to_usable_region

test_repr()[source]

UsableRegion: __repr__

test_update_no_valid_monitors()[source]

UsableRegion: Empty list of monitors doesn’t raise exception

test_update_nonempty()[source]

UsableRegion: only add non-empty entries to _usable

test_update_typecheck()[source]

UsableRegion: type enforcement for internal _update function