Skip to content

Commit

Permalink
Add a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed Mar 5, 2016
1 parent 5f269ed commit c98042b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ def test_itemgetter(self):
getter2 = ser.loads(ser.dumps(getter))
self.assertEqual(getter(d), getter2(d))

def test_function_module_name(self):
ser = CloudPickleSerializer()
func = lambda x: x
func2 = ser.loads(ser.dumps(func))
self.assertEqual(func.__module__, func2.__module__)

def test_attrgetter(self):
from operator import attrgetter
ser = CloudPickleSerializer()
Expand Down

0 comments on commit c98042b

Please sign in to comment.