GRAYBYTE WORDPRESS FILE MANAGER8824

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/hc_python/lib/python3.12/site-packages/psutil/tests/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/hc_python/lib/python3.12/site-packages/psutil/tests//test_sunos.py
#!/usr/bin/env python3

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Sun OS specific tests."""

import os

import psutil
from psutil import SUNOS
from psutil.tests import PsutilTestCase
from psutil.tests import pytest
from psutil.tests import sh


@pytest.mark.skipif(not SUNOS, reason="SUNOS only")
class SunOSSpecificTestCase(PsutilTestCase):
    def test_swap_memory(self):
        out = sh(f"env PATH=/usr/sbin:/sbin:{os.environ['PATH']} swap -l")
        lines = out.strip().split('\n')[1:]
        if not lines:
            raise ValueError('no swap device(s) configured')
        total = free = 0
        for line in lines:
            fields = line.split()
            total = int(fields[3]) * 512
            free = int(fields[4]) * 512
        used = total - free

        psutil_swap = psutil.swap_memory()
        assert psutil_swap.total == total
        assert psutil_swap.used == used
        assert psutil_swap.free == free

    def test_cpu_count(self):
        out = sh("/usr/sbin/psrinfo")
        assert psutil.cpu_count() == len(out.split('\n'))

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 04 2025 08:00:21
root / root
0755
__pycache__
--
April 04 2025 08:00:21
root / root
0755
__init__.py
62.602 KB
April 04 2025 08:00:20
root / root
0644
__main__.py
0.302 KB
April 04 2025 08:00:21
root / root
0644
test_aix.py
4.305 KB
April 04 2025 08:00:20
root / root
0644
test_bsd.py
19.718 KB
April 04 2025 08:00:21
root / root
0644
test_connections.py
20.661 KB
April 04 2025 08:00:20
root / root
0644
test_contracts.py
11.72 KB
April 04 2025 08:00:20
root / root
0644
test_linux.py
86.812 KB
April 04 2025 08:00:20
root / root
0644
test_memleaks.py
14.767 KB
April 04 2025 08:00:21
root / root
0644
test_misc.py
28.977 KB
April 04 2025 08:00:21
root / root
0644
test_osx.py
6.167 KB
April 04 2025 08:00:21
root / root
0644
test_posix.py
16.784 KB
April 04 2025 08:00:21
root / root
0644
test_process.py
58.478 KB
April 04 2025 08:00:21
root / root
0644
test_process_all.py
17.917 KB
April 04 2025 08:00:21
root / root
0644
test_scripts.py
7.544 KB
April 04 2025 08:00:21
root / root
0644
test_sunos.py
1.162 KB
April 04 2025 08:00:20
root / root
0644
test_system.py
35.261 KB
April 04 2025 08:00:21
root / root
0644
test_testutils.py
17.908 KB
April 04 2025 08:00:21
root / root
0644
test_unicode.py
10.148 KB
April 04 2025 08:00:21
root / root
0644
test_windows.py
32.436 KB
April 04 2025 08:00:21
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF