/usr/lib/python2.7/dist-packages/pyvows/commands.py is in python-pyvows 2.1.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import subprocess
import distutils.cmd
import distutils.log
class VowsCommand(distutils.cmd.Command):
"""Custom command to run pyvows vows"""
description = 'Run pyvows tests'
user_options = [
('pyvows-path=', None, 'Directory or file to search for vows.'),
('pyvows-pattern=', None, 'Pattern for filtering vows files'),
]
def initialize_options(self):
"""Set default values for options."""
self.pyvows_pattern = '*_vows.py'
self.pyvows_path = 'tests/'
def finalize_options(self):
pass
def run(self):
cmd = 'pyvows -p "{pattern}" {path}'.format(
path=self.pyvows_path,
pattern=self.pyvows_pattern
)
self.announce('Executing ' + cmd, level=distutils.log.INFO)
subprocess.call(cmd, shell=True)
|