Coverage for /usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/tests/__init__.py: 8%

12 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-14 15:55 +0200

1# This file is part of h5py, a Python interface to the HDF5 library. 

2# 

3# http://www.h5py.org 

4# 

5# Copyright 2008-2013 Andrew Collette and contributors 

6# 

7# License: Standard 3-clause BSD; see "license.txt" for full license terms 

8# and contributor agreement. 

9 

10 

11def run_tests(args=''): 

12 try: 

13 from pytest import main 

14 except ImportError: 

15 print("Tests require pytest, pytest not installed") 

16 return 1 

17 else: 

18 from shlex import split 

19 from subprocess import call 

20 from sys import executable 

21 cli = [executable, "-m", "pytest", "--pyargs", __name__.replace('.tests','')] 

22 cli.extend(split(args)) 

23 return call(cli)