? GR0V Shell

GR0V shell

Linux server122.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64

Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/compat/tests/
File Upload :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/compat/tests/test_compat.py

from os.path import join
from io import BufferedReader, BytesIO

from numpy.compat import isfileobj
from numpy.testing import assert_
from numpy.testing import tempdir


def test_isfileobj():
    with tempdir(prefix="numpy_test_compat_") as folder:
        filename = join(folder, 'a.bin')

        with open(filename, 'wb') as f:
            assert_(isfileobj(f))

        with open(filename, 'ab') as f:
            assert_(isfileobj(f))

        with open(filename, 'rb') as f:
            assert_(isfileobj(f))

        assert_(isfileobj(BufferedReader(BytesIO())) is False)

T1KUS90T
  root-grov@198.54.114.191:~$