Skip to content

Commit

Permalink
create a "tests" key in extras_require
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed Jan 16, 2021
1 parent ebfcaa4 commit e7d151f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
5 changes: 1 addition & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,12 @@ install:
- python --version
- python -m pip install --upgrade pip
- python -m pip install --upgrade setuptools wheel
- python -m pip install --upgrade pytest pytest-cov pytest-runner
- python -m pip install %QT_API%
- IF "%CLONE_PYTHONNET%"=="true" (
python -m pip install --upgrade pycparser &&
python -m pip install git+https://github.com/pythonnet/pythonnet.git
) ELSE (
python -m pip install --upgrade pythonnet
)
- python -m pip list
- python -m pip install --upgrade --editable .[tests]

build: off

Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ install:
- python --version
- python -m pip install --upgrade pip
- python -m pip install --upgrade setuptools wheel
- python -m pip install --upgrade pytest pytest-cov pytest-runner
- python -m pip install --upgrade $QT_API
- python -m pip list
- python -m pip install --upgrade --editable .[tests]

before_script:
- |
Expand Down
14 changes: 6 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,11 @@ def get_version():

install_requires = []

tests_require = ['pytest', 'pytest-cov']
if sys.version_info[:2] == (3, 5):
tests_require.append('PySide2')
else:
tests_require.append('PySide6')

if sys.platform == 'win32' and sys.version_info[:2] < (3, 9):
tests_require.append('pythonnet')
tests_require = [
'pytest',
'pytest-cov',
"pythonnet;sys_platform=='win32' and python_version<'3.9'",
]

testing = {'test', 'tests', 'pytest'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if testing else []
Expand Down Expand Up @@ -184,6 +181,7 @@ def get_version():
'PySide2': ['PySide2'],
'PyQt6': ['PyQt6'],
'PyQt5': ['PyQt5'],
'tests': tests_require,
},
cmdclass={'docs': BuildDocs, 'apidocs': ApiDocs},
packages=find_packages(include=('msl*',)),
Expand Down

0 comments on commit e7d151f

Please sign in to comment.