Skip to content
Browse files

Closes #3

  • Loading branch information...
1 parent 9d44750 commit 2f8b5b806b6faa06ef60e5b39645e3344308840e @klbostee committed Mar 12, 2009
Showing with 7 additions and 5 deletions.
  1. +4 −3 tests/testcoding.py
  2. +3 −2 tests/testmapred.py
View
7 tests/testcoding.py
@@ -1,10 +1,11 @@
-import dumbo,unittest
+import unittest
+from dumbo import util
class TestCoding(unittest.TestCase):
def dotest(self,data):
- dumped = "\t".join(dumbo.dumpcode([("dummy",data)]).next())
- self.assertEqual(dumbo.loadcode([dumped]).next()[1],data)
+ dumped = "\t".join(util.dumpcode([("dummy",data)]).next())
+ self.assertEqual(util.loadcode([dumped]).next()[1],data)
def testtuple(self):
self.dotest(tuple())
View
5 tests/testmapred.py
@@ -1,4 +1,5 @@
-import dumbo,unittest
+import unittest
+from dumbo import core
class TestMapRed(unittest.TestCase):
def testwordcount(self):
@@ -7,7 +8,7 @@ def mapper(key,value):
def reducer(key,values):
yield key,sum(values)
input = enumerate(['one two','two one two'])
- output = dict(dumbo.itermapred(input,mapper,reducer))
+ output = dict(core.itermapred(input,mapper,reducer))
self.assertEqual(output['one'],2)
self.assertEqual(output['two'],3)

0 comments on commit 2f8b5b8

Please sign in to comment.
Something went wrong with that request. Please try again.