From 6fcb928a8d25b2a3d3861aa00e124820d5cd3008 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 8 Nov 2021 13:39:22 -0500 Subject: [PATCH] Support either nose or nose2 as test runner --- read_roi/test/test_read_roi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/read_roi/test/test_read_roi.py b/read_roi/test/test_read_roi.py index 48fc044..bc68e65 100644 --- a/read_roi/test/test_read_roi.py +++ b/read_roi/test/test_read_roi.py @@ -2,7 +2,12 @@ import json from unittest import TestCase -from nose.tools import nottest +try: + from nose.tools import nottest +except ImportError: + # Do-nothing decorator: ok when the test runner is nose2 + def nottest(func): + return func import read_roi