James E. Blair 22961c5ba5 Add tests for the allocator
And fix a bug in it that caused too-small allocations in some
circumstances.

The main demonstration of this failure was:
  nodepool.tests.test_allocator.TwoLabels.test_allocator(two_nodes)

Which allocated 1,2 instead of 2,2.  But the following tests also
failed:

  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(four_nodes_over_quota)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(four_nodes)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(three_nodes)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(four_nodes_at_quota)
  nodepool.tests.test_allocator.TwoProvidersTwoLabels.test_allocator(one_node)

Change-Id: Idba0e52b2775132f52386785b3d5f0974c5e0f8e
2014-03-31 09:20:16 -07:00
..
2014-03-31 09:20:16 -07:00
2013-08-15 09:47:23 -07:00
2014-03-31 09:20:16 -07:00