Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.217.130
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
python33 /
lib64 /
python3.3 /
ctypes /
test /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-05-01 04:20
__init__.py
6.98
KB
-rw-r--r--
2024-04-17 20:28
runtests.py
682
B
-rw-r--r--
2024-04-17 20:28
test_anon.py
2
KB
-rw-r--r--
2024-04-17 20:28
test_array_in_pointer.py
1.7
KB
-rw-r--r--
2024-04-17 20:28
test_arrays.py
5.54
KB
-rw-r--r--
2024-04-17 20:28
test_as_parameter.py
6.63
KB
-rw-r--r--
2024-04-17 20:28
test_bitfields.py
9.08
KB
-rw-r--r--
2024-04-17 20:28
test_buffers.py
2.18
KB
-rw-r--r--
2024-04-17 20:28
test_bytes.py
1.16
KB
-rw-r--r--
2024-04-17 20:28
test_byteswap.py
10.57
KB
-rw-r--r--
2024-04-17 20:28
test_callbacks.py
8.77
KB
-rw-r--r--
2024-04-17 20:28
test_cast.py
3.13
KB
-rw-r--r--
2024-04-17 20:28
test_cfuncs.py
7.44
KB
-rw-r--r--
2024-04-17 20:28
test_checkretval.py
995
B
-rw-r--r--
2024-04-17 20:28
test_delattr.py
533
B
-rw-r--r--
2024-04-17 20:28
test_errcheck.py
477
B
-rw-r--r--
2024-04-17 20:28
test_errno.py
2.25
KB
-rw-r--r--
2024-04-17 20:28
test_find.py
2.41
KB
-rw-r--r--
2024-04-17 20:28
test_frombuffer.py
2.42
KB
-rw-r--r--
2024-04-17 20:28
test_funcptr.py
3.82
KB
-rw-r--r--
2024-04-17 20:28
test_functions.py
12.35
KB
-rw-r--r--
2024-04-17 20:28
test_incomplete.py
1023
B
-rw-r--r--
2024-04-17 20:28
test_init.py
1.01
KB
-rw-r--r--
2024-04-17 20:28
test_integers.py
96
B
-rw-r--r--
2024-04-17 20:28
test_internals.py
2.56
KB
-rw-r--r--
2024-04-17 20:28
test_keeprefs.py
3.93
KB
-rw-r--r--
2024-04-17 20:28
test_libc.py
1005
B
-rw-r--r--
2024-04-17 20:28
test_loading.py
4
KB
-rw-r--r--
2024-04-17 20:28
test_macholib.py
1.56
KB
-rw-r--r--
2024-04-17 20:28
test_memfunctions.py
3.24
KB
-rw-r--r--
2024-04-17 20:28
test_numbers.py
9
KB
-rw-r--r--
2024-04-17 20:28
test_objects.py
1.72
KB
-rw-r--r--
2024-04-17 20:28
test_parameters.py
6.16
KB
-rw-r--r--
2024-04-17 20:28
test_pep3118.py
7.35
KB
-rw-r--r--
2024-04-17 20:28
test_pickling.py
2.15
KB
-rw-r--r--
2024-04-17 20:28
test_pointers.py
6.12
KB
-rw-r--r--
2024-04-17 20:28
test_prototypes.py
6.63
KB
-rw-r--r--
2024-04-17 20:28
test_python_api.py
3.07
KB
-rw-r--r--
2024-04-17 20:28
test_random_things.py
2.77
KB
-rw-r--r--
2024-04-17 20:28
test_refcounts.py
2.52
KB
-rw-r--r--
2024-04-17 20:28
test_repr.py
842
B
-rw-r--r--
2024-04-17 20:28
test_returnfuncptrs.py
2.83
KB
-rw-r--r--
2024-04-17 20:28
test_simplesubclasses.py
1.26
KB
-rw-r--r--
2024-04-17 20:28
test_sizes.py
815
B
-rw-r--r--
2024-04-17 20:28
test_slicing.py
5.95
KB
-rw-r--r--
2024-04-17 20:28
test_stringptr.py
2.48
KB
-rw-r--r--
2024-04-17 20:28
test_strings.py
6.94
KB
-rw-r--r--
2024-04-17 20:28
test_struct_fields.py
1.47
KB
-rw-r--r--
2024-04-17 20:28
test_structures.py
15.43
KB
-rw-r--r--
2024-04-17 20:28
test_unaligned_structures.py
1.19
KB
-rw-r--r--
2024-04-17 20:28
test_unicode.py
1.87
KB
-rw-r--r--
2024-04-17 20:28
test_values.py
3.43
KB
-rw-r--r--
2024-04-17 20:28
test_varsize_struct.py
1.8
KB
-rw-r--r--
2024-04-17 20:28
test_win32.py
3.96
KB
-rw-r--r--
2024-04-17 20:28
test_wintypes.py
1.44
KB
-rw-r--r--
2024-04-17 20:28
Save
Rename
import os, sys, unittest, getopt, time use_resources = [] class ResourceDenied(Exception): """Test skipped because it requested a disallowed resource. This is raised when a test calls requires() for a resource that has not be enabled. Resources are defined by test modules. """ def is_resource_enabled(resource): """Test whether a resource is enabled. If the caller's module is __main__ then automatically return True.""" if sys._getframe().f_back.f_globals.get("__name__") == "__main__": return True result = use_resources is not None and \ (resource in use_resources or "*" in use_resources) if not result: _unavail[resource] = None return result _unavail = {} def requires(resource, msg=None): """Raise ResourceDenied if the specified resource is not available. If the caller's module is __main__ then automatically return True.""" # see if the caller's module is __main__ - if so, treat as if # the resource was set if sys._getframe().f_back.f_globals.get("__name__") == "__main__": return if not is_resource_enabled(resource): if msg is None: msg = "Use of the `%s' resource not enabled" % resource raise ResourceDenied(msg) def find_package_modules(package, mask): import fnmatch if (hasattr(package, "__loader__") and hasattr(package.__loader__, '_files')): path = package.__name__.replace(".", os.path.sep) mask = os.path.join(path, mask) for fnm in package.__loader__._files.keys(): if fnmatch.fnmatchcase(fnm, mask): yield os.path.splitext(fnm)[0].replace(os.path.sep, ".") else: path = package.__path__[0] for fnm in os.listdir(path): if fnmatch.fnmatchcase(fnm, mask): yield "%s.%s" % (package.__name__, os.path.splitext(fnm)[0]) def get_tests(package, mask, verbosity, exclude=()): """Return a list of skipped test modules, and a list of test cases.""" tests = [] skipped = [] for modname in find_package_modules(package, mask): if modname.split(".")[-1] in exclude: skipped.append(modname) if verbosity > 1: print("Skipped %s: excluded" % modname, file=sys.stderr) continue try: mod = __import__(modname, globals(), locals(), ['*']) except (ResourceDenied, unittest.SkipTest) as detail: skipped.append(modname) if verbosity > 1: print("Skipped %s: %s" % (modname, detail), file=sys.stderr) continue for name in dir(mod): if name.startswith("_"): continue o = getattr(mod, name) if type(o) is type(unittest.TestCase) and issubclass(o, unittest.TestCase): tests.append(o) return skipped, tests def usage(): print(__doc__) return 1 def test_with_refcounts(runner, verbosity, testcase): """Run testcase several times, tracking reference counts.""" import gc import ctypes ptc = ctypes._pointer_type_cache.copy() cfc = ctypes._c_functype_cache.copy() wfc = ctypes._win_functype_cache.copy() # when searching for refcount leaks, we have to manually reset any # caches that ctypes has. def cleanup(): ctypes._pointer_type_cache = ptc.copy() ctypes._c_functype_cache = cfc.copy() ctypes._win_functype_cache = wfc.copy() gc.collect() test = unittest.makeSuite(testcase) for i in range(5): rc = sys.gettotalrefcount() runner.run(test) cleanup() COUNT = 5 refcounts = [None] * COUNT for i in range(COUNT): rc = sys.gettotalrefcount() runner.run(test) cleanup() refcounts[i] = sys.gettotalrefcount() - rc if filter(None, refcounts): print("%s leaks:\n\t" % testcase, refcounts) elif verbosity: print("%s: ok." % testcase) class TestRunner(unittest.TextTestRunner): def run(self, test, skipped): "Run the given test case or test suite." # Same as unittest.TextTestRunner.run, except that it reports # skipped tests. result = self._makeResult() startTime = time.time() test(result) stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun if _unavail: #skipped: requested = list(_unavail.keys()) requested.sort() self.stream.writeln("Ran %d test%s in %.3fs (%s module%s skipped)" % (run, run != 1 and "s" or "", timeTaken, len(skipped), len(skipped) != 1 and "s" or "")) self.stream.writeln("Unavailable resources: %s" % ", ".join(requested)) else: self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() if not result.wasSuccessful(): self.stream.write("FAILED (") failed, errored = map(len, (result.failures, result.errors)) if failed: self.stream.write("failures=%d" % failed) if errored: if failed: self.stream.write(", ") self.stream.write("errors=%d" % errored) self.stream.writeln(")") else: self.stream.writeln("OK") return result def main(*packages): try: opts, args = getopt.getopt(sys.argv[1:], "rqvu:x:") except getopt.error: return usage() verbosity = 1 search_leaks = False exclude = [] for flag, value in opts: if flag == "-q": verbosity -= 1 elif flag == "-v": verbosity += 1 elif flag == "-r": try: sys.gettotalrefcount except AttributeError: print("-r flag requires Python debug build", file=sys.stderr) return -1 search_leaks = True elif flag == "-u": use_resources.extend(value.split(",")) elif flag == "-x": exclude.extend(value.split(",")) mask = "test_*.py" if args: mask = args[0] for package in packages: run_tests(package, mask, verbosity, search_leaks, exclude) def run_tests(package, mask, verbosity, search_leaks, exclude): skipped, testcases = get_tests(package, mask, verbosity, exclude) runner = TestRunner(verbosity=verbosity) suites = [unittest.makeSuite(o) for o in testcases] suite = unittest.TestSuite(suites) result = runner.run(suite, skipped) if search_leaks: # hunt for refcount leaks runner = BasicTestRunner() for t in testcases: test_with_refcounts(runner, verbosity, t) return bool(result.errors) class BasicTestRunner: def run(self, test): result = unittest.TestResult() test(result) return result