403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.145.77.232
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/opt/hc_python/lib/python3.8/site-packages/greenlet/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/opt/hc_python/lib/python3.8/site-packages/greenlet/tests/test_version.py
#! /usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function

import sys
import os
from unittest import TestCase as NonLeakingTestCase

import greenlet

# No reason to run this multiple times under leakchecks,
# it doesn't do anything.
class VersionTests(NonLeakingTestCase):
    def test_version(self):
        def find_dominating_file(name):
            if os.path.exists(name):
                return name

            tried = []
            here = os.path.abspath(os.path.dirname(__file__))
            for i in range(10):
                up = ['..'] * i
                path = [here] + up + [name]
                fname = os.path.join(*path)
                fname = os.path.abspath(fname)
                tried.append(fname)
                if os.path.exists(fname):
                    return fname
            raise AssertionError("Could not find file " + name + "; checked " + str(tried))

        try:
            setup_py = find_dominating_file('setup.py')
        except AssertionError as e:
            self.skipTest("Unable to find setup.py; must be out of tree. " + str(e))


        invoke_setup = "%s %s --version" % (sys.executable, setup_py)
        with os.popen(invoke_setup) as f:
            sversion = f.read().strip()

        self.assertEqual(sversion, greenlet.__version__)

Youez - 2016 - github.com/yon3zu
LinuXploit