opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
setuptools
/
tests
➕ New
📤 Upload
✎ Editing:
test_glob.py
← Back
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))
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel