/usr/lib/python2.7/dist-packages/pyvisa-py/testsuite/__init__.py is in python-pyvisa-py 0.2-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 30 31 | # -*- coding: utf-8 -*-
from __future__ import division, unicode_literals, print_function, absolute_import
import os
from pyvisa.compat import unittest
def testsuite():
"""A testsuite that has all the pyvisa tests.
"""
return unittest.TestLoader().discover(os.path.dirname(__file__))
def main():
"""Runs the testsuite as command line application.
"""
try:
unittest.main()
except Exception as e:
print('Error: %s' % e)
def run():
"""Run all tests.
:return: a :class:`unittest.TestResult` object
"""
test_runner = unittest.TextTestRunner()
return test_runner.run(testsuite())
|