From 31aecd9b092d5bab27aac2288758eedbeda7bb81 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Mon, 15 Aug 2011 20:30:17 -0700 Subject: ENH: remove unused class definition NumpyDocTestCase definition overwritten further down the file. The deleted class only redefined the ``id`` method with the same code as that in the parent class since before nose 0.10. --- numpy/testing/noseclasses.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'numpy/testing/noseclasses.py') diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py index 74b886fed..9e5166ef5 100644 --- a/numpy/testing/noseclasses.py +++ b/numpy/testing/noseclasses.py @@ -12,7 +12,7 @@ import nose from nose.plugins import doctests as npd from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin from nose.plugins.base import Plugin -from nose.util import src, getpackage +from nose.util import src import numpy from nosetester import get_package_name import inspect @@ -117,27 +117,6 @@ class NumpyDocTestFinder(doctest.DocTestFinder): globs, seen) -class NumpyDocTestCase(npd.DocTestCase): - """Proxy for DocTestCase: provides an address() method that - returns the correct address for the doctest case. Otherwise - acts as a proxy to the test case. To provide hints for address(), - an obj may also be passed -- this will be used as the test object - for purposes of determining the test address, if it is provided. - """ - - # doctests loaded via find(obj) omit the module name - # so we need to override id, __repr__ and shortDescription - # bonus: this will squash a 2.3 vs 2.4 incompatiblity - def id(self): - name = self._dt_test.name - filename = self._dt_test.filename - if filename is not None: - pk = getpackage(filename) - if pk is not None and not name.startswith(pk): - name = "%s.%s" % (pk, name) - return name - - # second-chance checker; if the default comparison doesn't # pass, then see if the expected output string contains flags that # tell us to ignore the output -- cgit v1.2.1