class _DeprecationTestCase: (source)
Known subclasses: numpy.core.tests.test_deprecations.BuiltInRoundComplexDType
, numpy.core.tests.test_deprecations.FlatteningConcatenateUnsafeCast
, numpy.core.tests.test_deprecations.Test_GetSet_NumericOps
, numpy.core.tests.test_deprecations.TestArrayDataAttributeAssignmentDeprecation
, numpy.core.tests.test_deprecations.TestArrayFinalizeNone
, numpy.core.tests.test_deprecations.TestAxisNotMAXDIMS
, numpy.core.tests.test_deprecations.TestBinaryReprInsufficientWidthParameterForRepresentation
, numpy.core.tests.test_deprecations.TestBincount
, numpy.core.tests.test_deprecations.TestComparisonDeprecations
, numpy.core.tests.test_deprecations.TestCtypesGetter
, numpy.core.tests.test_deprecations.TestDatetime64Timezone
, numpy.core.tests.test_deprecations.TestDatetimeEvent
, numpy.core.tests.test_deprecations.TestDeprecatedGlobals
, numpy.core.tests.test_deprecations.TestDeprecatedUnpickleObjectScalar
, numpy.core.tests.test_deprecations.TestDeprecateSubarrayDTypeDuringArrayCoercion
, numpy.core.tests.test_deprecations.TestDTypeAttributeIsDTypeDeprecation
, numpy.core.tests.test_deprecations.TestDTypeCoercion
, numpy.core.tests.test_deprecations.TestFromstring
, numpy.core.tests.test_deprecations.TestFromStringAndFileInvalidData
, numpy.core.tests.test_deprecations.TestFutureWarningArrayLikeNotIterable
, numpy.core.tests.test_deprecations.TestGeneratorSum
, numpy.core.tests.test_deprecations.TestIncorrectAdvancedIndexWithEmptyResult
, numpy.core.tests.test_deprecations.TestLoadtxtParseIntsViaFloat
, numpy.core.tests.test_deprecations.TestMachAr
, numpy.core.tests.test_deprecations.TestMatrixInOuter
, numpy.core.tests.test_deprecations.TestMemEventHook
, numpy.core.tests.test_deprecations.TestNonExactMatchDeprecation
, numpy.core.tests.test_deprecations.TestNonNumericConjugate
, numpy.core.tests.test_deprecations.TestNonZero
, numpy.core.tests.test_deprecations.TestNoseDecoratorsDeprecated
, numpy.core.tests.test_deprecations.TestNPY_CHAR
, numpy.core.tests.test_deprecations.TestPartitionBoolIndex
, numpy.core.tests.test_deprecations.TestPositiveOnNonNumerical
, numpy.core.tests.test_deprecations.TestPyArray_AS1D
, numpy.core.tests.test_deprecations.TestPyArray_AS2D
, numpy.core.tests.test_deprecations.TestPyIntConversion
, numpy.core.tests.test_deprecations.TestQuantileInterpolationDeprecation
, numpy.core.tests.test_deprecations.TestShape1Fields
, numpy.core.tests.test_deprecations.TestSingleElementSignature
, numpy.core.tests.test_deprecations.TestToString
, numpy.core.tests.test_deprecations.TestTruthTestingEmptyArrays
, numpy.core.tests.test_deprecations._VisibleDeprecationTestCase
Undocumented
Method | assert |
Test if DeprecationWarnings are given and raised. |
Method | assert |
Test that warnings are not raised. |
Method | setup |
Undocumented |
Method | teardown |
Undocumented |
Class Variable | message |
Undocumented |
Instance Variable | log |
Undocumented |
Instance Variable | warn |
Undocumented |
Test if DeprecationWarnings are given and raised.
This first checks if the function when called gives num
DeprecationWarnings, after that it tries to raise these
DeprecationWarnings and compares them with exceptions
.
The exceptions can be different for cases where this code path
is simply not anticipated and the exception is replaced.
Parameters | |
function:callable | The function to test |
num:int | Number of DeprecationWarnings to expect. This should normally be 1. |
ignorebool | Whether warnings of the wrong type should be ignored (note that the message is not checked) |
functionbool | If the function would normally fail, setting this will check for warnings inside a try/except block. |
exceptions:Exception or tuple of Exceptions | Exception to expect when turning the warnings into an error. The default checks for DeprecationWarnings. If exceptions is empty the function is expected to run successfully. |
args:tuple | Arguments for function |
kwargs:dict | Keyword arguments for function |
Test that warnings are not raised.
This is just a shorthand for:
- self.assert_deprecated(function, num=0, ignore_others=True,
- exceptions=tuple(), args=args, kwargs=kwargs)
numpy.core.tests.test_deprecations.FlatteningConcatenateUnsafeCast
, numpy.core.tests.test_deprecations.TestArrayDataAttributeAssignmentDeprecation
, numpy.core.tests.test_deprecations.TestArrayFinalizeNone
, numpy.core.tests.test_deprecations.TestAxisNotMAXDIMS
, numpy.core.tests.test_deprecations.TestBinaryReprInsufficientWidthParameterForRepresentation
, numpy.core.tests.test_deprecations.TestComparisonDeprecations
, numpy.core.tests.test_deprecations.TestDeprecatedUnpickleObjectScalar
, numpy.core.tests.test_deprecations.TestDeprecateSubarrayDTypeDuringArrayCoercion
, numpy.core.tests.test_deprecations.TestDTypeAttributeIsDTypeDeprecation
, numpy.core.tests.test_deprecations.TestDTypeCoercion
, numpy.core.tests.test_deprecations.TestFromStringAndFileInvalidData
, numpy.core.tests.test_deprecations.TestFutureWarningArrayLikeNotIterable
, numpy.core.tests.test_deprecations.TestIncorrectAdvancedIndexWithEmptyResult
, numpy.core.tests.test_deprecations.TestLoadtxtParseIntsViaFloat
, numpy.core.tests.test_deprecations.TestMatrixInOuter
, numpy.core.tests.test_deprecations.TestPartitionBoolIndex
, numpy.core.tests.test_deprecations.TestPyIntConversion
, numpy.core.tests.test_deprecations.TestSingleElementSignature
, numpy.core.tests.test_deprecations.TestToString
, numpy.core.tests.test_deprecations.TestTruthTestingEmptyArrays
Undocumented