From b4e3a4227e3a9cfe28717db458e67d79e916a418 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 23 Jan 2020 14:44:36 -0700 Subject: MAINT: Replace basestring with str. This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py --- numpy/testing/_private/nosetester.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'numpy/testing') diff --git a/numpy/testing/_private/nosetester.py b/numpy/testing/_private/nosetester.py index 45a582bb6..bd6d002aa 100644 --- a/numpy/testing/_private/nosetester.py +++ b/numpy/testing/_private/nosetester.py @@ -7,7 +7,6 @@ This module implements ``test()`` and ``bench()`` functions for NumPy modules. import os import sys import warnings -from numpy.compat import basestring import numpy as np from .utils import import_nose, suppress_warnings @@ -212,7 +211,7 @@ class NoseTester: ''' argv = [__file__, self.package_path, '-s'] if label and label != 'full': - if not isinstance(label, basestring): + if not isinstance(label, str): raise TypeError('Selection label should be a string') if label == 'fast': label = 'not slow' @@ -419,7 +418,7 @@ class NoseTester: _warn_opts = dict(develop=(Warning,), release=()) - if isinstance(raise_warnings, basestring): + if isinstance(raise_warnings, str): raise_warnings = _warn_opts[raise_warnings] with suppress_warnings("location") as sup: -- cgit v1.2.1