def test_multi_load(self): '''Load from multiple paths''' shovel = Shovel() shovel.read('test/examples/multiple/one/', 'test/examples/multiple/one/') shovel.read('test/examples/multiple/two/', 'test/examples/multiple/two/') keys = [ 'whiz', 'bar.bar' ] self.assertEqual(set(shovel.keys()), set(keys))
def test_keys_items(self): '''Shovels should provide a list of all the tasks they know about''' shovel = Shovel.load('test/examples/nested/', 'test/examples/nested/') keys = [ 'foo.bar', 'foo.whiz', 'foo.baz.hello', 'foo.baz.howdy.what' ] self.assertEqual(set(shovel.keys()), set(keys)) for key, pair in zip(sorted(keys), sorted(shovel.items())): self.assertEqual(key, pair[0]) self.assertEqual(key, pair[1].fullname)