'``pmap_field`` has a factory that composes with an arg.'

@given(PYRSISTENT_STRUCT)
def test_factory_arg(self, klass):

    def ext_factory(count):
        if isinstance(count, int):
            return {(u'X' * i): i for i in xrange(count)}
        return count
    class Record(klass, ):
        value = pmap_field(unicode, int, factory=ext_factory)
        value2 = pmap_field(unicode, int, initial=2, factory=ext_factory)
    self.assertThat(Record(value=3).value, Equals({u'': 0, u'X': 1, u'XX': 2}))
    self.assertThat(Record(value=1).value2, Equals({u'': 0, u'X': 1}))
    self.assertThat(Record(value=3).value, IsInstance(PMap))
