From fec6b55e867c49608254ed7decd362201bed964d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bayle <j2b.bayle@gmail.com> Date: Thu, 1 Sep 2022 16:09:15 +0200 Subject: [PATCH] Cleanup measurement file after tests --- tests/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..a8b3299 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,14 @@ +#! /usr/bin/env python3 +# -*- coding: utf-8 -*- +"""Test setup functions.""" + +import os + + +def teardown_module(_): + """Remove test measurement file after all tests are executed.""" + + try: + os.remove('measurements.h5') + except FileNotFoundError: + pass -- GitLab