--- /dev/null
+.git* export-ignore
--- /dev/null
+name: Run tests
+
+on: [push, pull_request]
+
+defaults:
+ run:
+ shell: bash -el {0}
+
+jobs:
+ run-tests:
+ env:
+ not_in_conda: "[]"
+
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "=3.9[build=*_pypy]"]
+ exclude:
+ - os: windows-latest
+ python-version: "2.7"
+ - os: macos-latest
+ python-version: "2.7"
+ - os: macos-latest
+ python-version: "3.5"
+ - os: macos-latest
+ python-version: "3.6"
+ - os: macos-latest
+ python-version: "3.7"
+ - os: macos-latest
+ python-version: "=3.9[build=*_pypy]"
+ - os: windows-latest
+ python-version: "=3.9[build=*_pypy]"
+ include:
+ - os: ubuntu-latest
+ os-name: Linux
+ pip-cache-path: ~/.cache/pip
+ - os: macos-latest
+ os-name: MacOS
+ pip-cache-path: ~/Library/Caches/pip
+ - os: windows-latest
+ os-name: w32
+ pip-cache-path: ~\AppData\Local\pip\Cache
+
+ name: Python ${{ matrix.python-version }} @ ${{ matrix.os-name }}
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ # Setup Python/pip
+ - uses: actions/checkout@v4
+ - uses: conda-incubator/setup-miniconda@v3
+ with:
+ miniforge-version: latest
+ python-version: ${{ matrix.python-version }}
+ if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
+ # Python 3.7 is needed for ghactions-release script
+ - name: Install additional Python 3.7
+ run: |
+ conda create -n py37 --yes python=3.7
+ py37_prefix="`echo $CONDA_PREFIX | sed 's/__setup_conda/py37/'`"
+ ln -s "$py37_prefix/bin/python" "$CONDA_PREFIX/bin/python3.7"
+ ln -s "$py37_prefix/bin/pip" "$CONDA_PREFIX/bin/pip3.7"
+ python3.7 --version
+ pip3.7 --version
+ shell: bash
+ if: ${{ matrix.python-version == '2.7' && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }}
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ if: ${{ contains(fromJSON(env.not_in_conda), matrix.python-version) }}
+ - uses: actions/cache@v3
+ with:
+ path: ~/conda_pkgs_dir
+ key: ${{ runner.os }}-conda
+ - name: Cache pip
+ uses: actions/cache@v3
+ with:
+ path: ${{ matrix.pip-cache-path }}
+ key: ${{ runner.os }}-pip
+ # Setup tox
+ - name: Install dependencies
+ run: |
+ python --version
+ python -m pip || python -m ensurepip --default-pip --upgrade
+ python -m pip install --upgrade pip setuptools wheel
+ pip --version
+ pip install --upgrade virtualenv "tox >= 3.15, < 4"
+ - name: Set TOXENV
+ run: |
+ python -c "
+ import os, sys
+ ld_library_path = None
+ if hasattr(sys, 'pypy_version_info'):
+ toxenv = 'pypy3'
+ else:
+ pyver = '%d%d' % tuple(sys.version_info[:2])
+ if (pyver == '27') and (os.name == 'posix'): # Python 2.7 on Linux requires `$LD_LIBRARY_PATH`
+ ld_library_path = os.path.join(
+ os.path.dirname(os.path.dirname(sys.executable)), 'lib')
+ toxenv = 'py%s' % pyver
+ if os.name == 'posix':
+ toxenv += ',py%s-flake8' % pyver
+ with open(os.environ['GITHUB_ENV'], 'a') as f:
+ if ld_library_path:
+ f.write('LD_LIBRARY_PATH=' + ld_library_path + '\n')
+ f.write('TOXENV=' + toxenv + '\n')
+ "
+
+ - name: Run tox
+ run: |
+ python -c "import os; print(os.environ['TOXENV'])"
+ tox --version
+ tox
--- /dev/null
+/.cache/
+/.tox/
+/build/
+/data/
+/dist/
+mc_tests_torrent_vfs.egg-info
+/MANIFEST
+*.py[co]
+*.tmp
+*~
--- /dev/null
+==========================================
+Tests for torrent-vfs (Midnight Commander)
+==========================================
+
+Author: Oleg Broytman <phd@phdru.name>.
+
+Copyright (C) 2025 PhiloSoft Design.
+
+License: GPL.
+
+| Git repo: https://git.phdru.name/mc/mc-tests-torrent-vfs.git/
--- /dev/null
+pytest < 5.0; python_version == '2.7' or python_version == '3.4'
+pytest < 7.0; python_version >= '3.5'
--- /dev/null
+tox >= 3.15
--- /dev/null
+[bdist_wheel]
+universal = 1
+
+[egg_info]
+tag_build =
+tag_date = 0
+tag_svn_revision = 0
+
+[flake8]
+exclude = .git,.tox
+
--- /dev/null
+#!/usr/bin/env python3
+
+from setuptools import setup
+
+setup(
+ name='mc-tests-torrent-vfs',
+ version='0.0.1',
+ description='Tests for torrent-vfs (Midnight Commander)',
+ long_description=open('README.rst', 'r').read(),
+ long_description_content_type="text/x-rst",
+ author='Oleg Broytman',
+ author_email='phd@phdru.name',
+ project_urls={
+ 'Git repo': 'https://git.phdru.name/mc/mc-tests-torrent-vfs.git/',
+ },
+ license='GPL',
+ keywords=['mc', 'Midnight Commander', 'torrent', 'VFS', 'tests'],
+ platforms='Any',
+ classifiers=[
+ 'Development Status :: 1 - Planning',
+ 'Environment :: Console',
+ 'Intended Audience :: End Users/Desktop',
+ 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12',
+ 'Programming Language :: Python :: 3.13',
+ ],
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+)
--- /dev/null
+[tox]
+minversion = 3.15
+envlist = py27,py3{4,5,6,7,8,9,10,11,12,13},pypy,pypy3
+
+[testenv]
+commands =
+ {envpython} --version
+ {envpython} -c "import struct; print(struct.calcsize('P') * 8)"
+ {envpython} -m pytest --version
+ {envpython} -m pytest
+passenv = CI DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR
+deps =
+ -rdevscripts/requirements/requirements_tests.txt