403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/joblib/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/joblib/test/test_deprecated_objects.py
"""
Tests making sure that deprecated objects properly raise a deprecation warning
when imported/created.
"""
import pytest

from joblib.my_exceptions import _deprecated_names as _deprecated_exceptions
from joblib.format_stack import _deprecated_names as _deprecated_format_utils


def test_deprecated_joblib_exceptions():
    assert 'JoblibException' in _deprecated_exceptions
    for name in _deprecated_exceptions:
        msg = ('{} is deprecated and will be removed from joblib in '
               '0.16'.format(name))
        with pytest.warns(DeprecationWarning, match=msg):
            exec('from joblib.my_exceptions import {}'.format(name))


def test_deprecated_formatting_utilities(capsys):
    assert 'safe_repr' in _deprecated_format_utils
    assert 'eq_repr' in _deprecated_format_utils
    for name in _deprecated_format_utils:
        msg = ('{} is deprecated and will be removed from joblib in '
               '0.16'.format(name))
        with pytest.warns(DeprecationWarning, match=msg):
            exec('from joblib.format_stack import {}'.format(name))

Youez - 2016 - github.com/yon3zu
LinuXploit