Open Python Paths with vim

In OpenStack nova land, you run tests by specifying their Python paths, like so:

$ tox -e py27 nova.tests.unit.virt.libvirt.test_vif.LibvirtVifTestCase

This is also how tests are run and reported by the CI. If a tests fails when run locally or in the CI, the failure will be reported with similar Python module path-style references. These take a little cleanup to get a usable file path that we can use to open the file, so I automated it.

Download and copy this to somewhere on your path, then run it like so:

$ cd $openstack_nova_dir
$ pyvi nova.tests.unit.virt.libvirt.test_vif.LibvirtVifTestCase
comments powered by Disqus