https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /opt/prometheus-monitoring-scripts/lib/python3.10/site-packages/setuptools/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/prometheus-monitoring-scripts/lib/python3.10/site-packages/setuptools/tests/test_glob.py
import pytest
from jaraco import path

from setuptools.glob import glob


@pytest.mark.parametrize(
    ('tree', 'pattern', 'matches'),
    (
        ('', b'', []),
        ('', '', []),
        (
            """
     appveyor.yml
     CHANGES.rst
     LICENSE
     MANIFEST.in
     pyproject.toml
     README.rst
     setup.cfg
     setup.py
     """,
            '*.rst',
            ('CHANGES.rst', 'README.rst'),
        ),
        (
            """
     appveyor.yml
     CHANGES.rst
     LICENSE
     MANIFEST.in
     pyproject.toml
     README.rst
     setup.cfg
     setup.py
     """,
            b'*.rst',
            (b'CHANGES.rst', b'README.rst'),
        ),
    ),
)
def test_glob(monkeypatch, tmpdir, tree, pattern, matches):
    monkeypatch.chdir(tmpdir)
    path.build({name: '' for name in tree.split()})
    assert list(sorted(glob(pattern))) == list(sorted(matches))

https://t.me/RX1948 - 2025