It'd probably be preferable to declare plone.app.relationfield as a test dependency in setup.py, and remove the conditional here.