Today I came across this nice post that describes in detail how to create a full python package for distribution:

This post talks about using the standard library unittest module for testing, e.g.
# Python code here
import unittest
from googlemaps import GoogleMaps

class Test(unittest.TestCase):
 """Unit tests for googlemaps."""

 def test_local_search(self):
 """Test googlemaps local_search()."""
 gmaps = GoogleMaps(GMAPS_API_KEY, referrer_url='')
 local = gmaps.local_search('sushi san francisco, ca')
 result = local['responseData']['results'][0]
 self.assertEqual(result['titleNoFormatting'], 'Sushi Groove')

if __name__ == "__main__":

But I think this is needlessly complex and instead use nosetest.

    5           7