'We do not contaminate normal function pickling with concerns from
Twisted.'

def test_primeDirective(self):

    def expected(n):
        return '\n'.join([('c' + __name__), sampleFunction.__name__, ('p' + n), '.']).encode('ascii')
    self.assertEqual(pickle.dumps(sampleFunction, protocol=0), expected('0'))
    try:
        import cPickle
    except:
        pass
    else:
        self.assertEqual(cPickle.dumps(sampleFunction, protocol=0), expected('1'))
