Skip to content

Commit

Permalink
added a test for the map_reader before map_init -case which fails cur…
Browse files Browse the repository at this point in the history
…rently
  • Loading branch information
Ville Tuulos committed May 5, 2011
1 parent 52a390c commit 88551bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_init.py
@@ -1,11 +1,16 @@
from disco.test import TestCase, TestJob

class InitJob(TestJob):
params = {'x': 10}
sort = False

@staticmethod
def map_reader(stream, size, url, params):
params.x = 10
return (stream, size, url)

@staticmethod
def map_init(iter, params):
assert hasattr(params, 'x')
iter.next()
params['x'] += 100

Expand Down

0 comments on commit 88551bf

Please sign in to comment.