<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,7 +6,8 @@ def data_gen(path):
         return path[1:] + &quot;\n&quot;
 
 def fun_map(e, params):
-        return [(md5.new(str(math.pow(int(e), 2))).digest(), &quot;&quot;)]
+        k = str(int(math.ceil(float(e))) ** 2)
+        return [(md5.new(k).hexdigest(), &quot;&quot;)]
 
 tserver.run_server(data_gen)
 disco = Disco(sys.argv[1])
@@ -19,11 +20,17 @@ job = disco.new_job(name = &quot;test_reqmodules&quot;,
                 required_modules = [&quot;math&quot;, &quot;md5&quot;],
                 sort = False)
 
-for i, r in zip(inputs, result_iterator(job.wait())):
-        c = md5.new(str(math.pow(int(i), 2))).digest()
-        if c != r[0]:
-                raise Exception(&quot;Invalid answer: Correct: %s Got: %s&quot;\
-                        % (c, r[0]))
+res = list(result_iterator(job.wait()))
+if len(res) != len(inputs):
+        raise Exception(&quot;Too few results: Got: %d Should be %d&quot; %
+                (len(res), len(inputs)))
+
+cor = map(lambda x: md5.new(str(int(math.ceil(x)) ** 2)).hexdigest(), inputs)
+
+for k, v in res:
+        if k not in cor:
+                raise Exception(&quot;Invalid answer: %s&quot; % k)
+        cor.remove(k)	
 
 job.clean()
 print &quot;ok&quot;</diff>
      <filename>test/test_reqmodules.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>51d27f5dd3599f3401adaca6ba6baa6bd7381bf5</id>
    </parent>
  </parents>
  <author>
    <name>Ville Tuulos</name>
    <email>tuulos@nxfront.nokiapaloalto.com</email>
  </author>
  <url>http://github.com/tuulos/disco/commit/0c7cacf2af61a5dc23d4e642928bd168795f50a5</url>
  <id>0c7cacf2af61a5dc23d4e642928bd168795f50a5</id>
  <committed-date>2008-10-24T16:29:00-07:00</committed-date>
  <authored-date>2008-10-24T16:27:38-07:00</authored-date>
  <message>bugfix: test_reqmodules checked results incorrectly</message>
  <tree>d1f37b576eb5d6b476e8c608d223c6702a15c7be</tree>
  <committer>
    <name>Ville Tuulos</name>
    <email>tuulos@nxfront.nokiapaloalto.com</email>
  </committer>
</commit>
