?PNG
IHDR ? f ??C1 sRGB ?? gAMA ?a pHYs ? ??od GIDATx^LeY?a?("Bh?_????q5k?*:t0A-o??]VkJM??f?8\k2ll1]q????T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
]Kc @ sq d Z d d k Z d d k Z d d k l Z l Z d Z e d Z d d Z
d d Z e d Z d S( s
Decorators for labeling and modifying behavior of test objects.
Decorators that merely return a modified version of the original
function object are straightforward. Decorators that return a new
function object need to use
::
nose.tools.make_decorator(original_function)(decorator)
in returning the decorator, in order to preserve meta-data such as
function name, setup and teardown functions and so on - see
``nose.tools`` for more information.
iN( t WarningManagert WarningMessagec C s
t | _ | S( s
Label a test as 'slow'.
The exact definition of a slow test is obviously both subjective and
hardware-dependent, but in general any individual test that requires more
than a second or two should be labeled as slow (the whole suite consits of
thousands of tests, so even a second is significant).
Parameters
----------
t : callable
The test to label as slow.
Returns
-------
t : callable
The decorated test `t`.
Examples
--------
The `numpy.testing` module includes ``import decorators as dec``.
A test can be decorated as slow like this::
from numpy.testing import *
@dec.slow
def test_big(self):
print 'Big, slow test'
( t Truet slow( t t( ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyR s c s f d } | S( s
Signals to nose that this function is or is not a test.
Parameters
----------
tf : bool
If True, specifies that the decorated callable is a test.
If False, specifies that the decorated callable is not a test.
Default is True.
Notes
-----
This decorator can't use the nose namespace, because it can be
called from a non-test module. See also ``istest`` and ``nottest`` in
``nose.tools``.
Examples
--------
`setastest` can be used in the following way::
from numpy.testing.decorators import setastest
@setastest(False)
def func_with_test_in_name(arg1, arg2):
pass
c s
| _ | S( N( t __test__( R ( t tf( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt set_testU s ( ( R R ( ( R s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt setastest9 s c s f d } | S( s
Make function raise SkipTest exception if a given condition is true.
If the condition is a callable, it is used at runtime to dynamically
make the decision. This is useful for tests that may require costly
imports, to delay the cost until the test suite is actually executed.
Parameters
----------
skip_condition : bool or callable
Flag to determine whether to skip the decorated test.
msg : str, optional
Message to give on raising a SkipTest exception. Default is None.
Returns
-------
decorator : function
Decorator which, when applied to a function, causes SkipTest
to be raised when `skip_condition` is True, and the function
to be called normally otherwise.
Notes
-----
The decorator itself is decorated with the ``nose.tools.make_decorator``
function in order to transmit function name, and various other metadata.
c s d d k t o f d n f d d d f d } f d } i i o
| } n | } i i | S( Nic s S( ( ( ( t skip_condition( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt ~ s c s S( ( ( ( R ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyR
s c S s2 | d j o
d } n d | } d | i | f S( s; Skip message with information about function being skipped.s" Test skipped due to test conditions
s Skipping test: %s%sN( t Nonet __name__( t funct msgt out( ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt get_msg s
c s7 o i n | | Sd S( s" Skipper for normal test functions.N( t SkipTest( t argst kwargs( t fR t noseR t skip_val( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt skipper_func s
c ? sI o i n x | | D] } | Vq6 Wd S( s Skipper for test generators.N( R ( R R t x( R R R R R ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt skipper_gen s
( R t callableR t utilt isgeneratort toolst make_decorator( R R R t skipper( R R ( R R R R s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt skip_decoratorw s
( ( R R R ( ( R R s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt skipifZ s -c s\ d j o
d n t o f d n f d f d } | S( s
Make function raise KnownFailureTest exception if given condition is true.
If the condition is a callable, it is used at runtime to dynamically
make the decision. This is useful for tests that may require costly
imports, to delay the cost until the test suite is actually executed.
Parameters
----------
fail_condition : bool or callable
Flag to determine whether to mark the decorated test as a known
failure (if True) or not (if False).
msg : str, optional
Message to give on raising a KnownFailureTest exception.
Default is None.
Returns
-------
decorator : function
Decorator, which, when applied to a function, causes SkipTest
to be raised when `skip_condition` is True, and the function
to be called normally otherwise.
Notes
-----
The decorator itself is decorated with the ``nose.tools.make_decorator``
function in order to transmit function name, and various other metadata.
s! Test skipped due to known failurec s S( ( ( ( t fail_condition( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyR
s c s S( ( ( ( R" ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyR
s c sJ d d k } d d k l f d } | i i | S( Ni( t KnownFailureTestc s( o
n | | Sd S( N( ( R R ( R t fail_valR# R ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt knownfailer s
( R t noseclassesR# R R ( R R R% ( R$ R ( R R# s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt knownfail_decorator s N( R R ( R" R R' ( ( R" R$ R s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt knownfailureif s
c s f d } | S( s
Filter deprecation warnings while running the test suite.
This decorator can be used to filter DeprecationWarning's, to avoid
printing them during the test suite run, while checking that the test
actually raises a DeprecationWarning.
Parameters
----------
conditional : bool or callable, optional
Flag to determine whether to mark test as deprecated or not. If the
condition is a callable, it is used at runtime to dynamically make the
decision. Default is True.
Returns
-------
decorator : function
The `deprecated` decorator itself.
Notes
-----
.. versionadded:: 1.4.0
c sq d d k } d d k l } f d } t o
} n } | o | i i | S Sd S( Ni( R# c s t d t } | i } t i d zp | | t | d j p t d i n | d i t j o! t d i | d f n Wd | i
Xd S( Nt recordt alwaysi s! No warning raised when calling %ss8 First warning for %s is not a DeprecationWarning( is %s)( R R t __enter__t warningst simplefiltert lent AssertionErrorR t categoryt DeprecationWarningt __exit__( R R t ctxt l( R ( s> /usr/lib64/python2.6/site-packages/numpy/testing/decorators.pyt _deprecated_imp s
( R R&