Page MenuHomePhabricator

Migrate aspects to an existing parameterized testing framework
Closed, DeclinedPublic

Description

aspects.py provides similar functionality to the package testscenarios.

Features of aspects that are missing should be added to testscenarios, so that we could adopt it by essentially renaming TestCase.sites to TestCase,scenarios , plus any parts of aspects that may not be able to be easily generalised.

Event Timeline

jayvdb claimed this task.
jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot-tests.
jayvdb subscribed.

It depends on testtools, which depends on unittest2 v1.0, which conflicts with the version of unittest2 that our travis builds use for py2.6: v0.8

v0.4 which is released on pypi (but not on launchpad) works on py3. However some of the tests fail, but those failures are problems in the tests only. I've put forward a patch for the tests. https://code.launchpad.net/testscenarios .

There is a patch which adds a nice decorator @with_scenarios , however it is based on v0.3 which isnt py3 compatible: https://code.launchpad.net/~julian+/testscenarios/testscenarios

jayvdb set Security to None.

Note that we locked to unittest2 0.8 in f903c8c8 because of some dependency which is afaik (T92277#1188073) not present anymore so we might be able to use unittest2 1.0.

A working example of testscenarios on travis, using @with_scenarios.

https://travis-ci.org/jayvdb/anyhttp

I needed to download the tarball for testscenarios, as travis doesnt have bzr and installing it fails on travis py3 instances.

jayvdb renamed this task from migrate aspects to testscenarios to Migrate aspects to an existing parameterized testing framework.Nov 3 2015, 7:36 PM
jayvdb updated the task description. (Show Details)
Xqt added a project: Pywikibot.