Commit Graph

10 Commits

Author SHA1 Message Date
Calum Lind d064ad06c5
[Docs] Replace black/flake8 with pre-commit 2024-09-08 18:32:06 +01:00
Calum Lind b2005ecd78
[Tests] Fix console tests stalling by pinning pytest to 7.4.2
Tests were stalling in deluge_ui_entry with pytest 7.4.3 likely due to
changes in the way it handles stderr but it is not clean the extact
issue.

For now we will pin the pytest version and look to fix the issue later.

Reference: https://docs.pytest.org/en/stable/changelog.html#pytest-7-4-3-2023-10-24
2023-11-19 23:14:44 +00:00
Calum Lind 905a7dc3bc
[Tests] Only pin libtorrent for tests
Bump versions for Windows packaging
2023-05-30 17:11:13 +01:00
Calum Lind e70a983a55
[Tests] Fix save_resume_data errors in test_torrent
Error in test_rename_unicode:

   TypeError: object MagicMock can't be used in 'await' expression

Fixed by using AsyncMock that can be awaited.
Added backport asyncmock for Python 3.7
2023-02-28 15:05:52 +00:00
DjLegolas 13be64d355
[CI] Changed tested python version to 3.7 and 3.10
We cannot add python 3.6 because there is no precompiled version of it to used.
Therefor, will be using 3.7 as the minimum version in CI.
In addition, dropped version limits from pytest.
2022-03-02 12:53:29 +00:00
Calum Lind 610a1bb313 [Lint] Update pre-commit hook and isort versions
* Fixed black hook requiring Py3.6 to installed locally. Will now assume
Py3.6+ in installed.
 * Added isort traceback in pre-commit flake8 hook fails
 * Updated versions of Black, Prettier and isort
 * Keep Flake8 at 3.7.9 due to E402 issue: https://gitlab.com/pycqa/flake8/-/issues/638
 * New pyproject config for isort v5 with fixes for Python 2 imports.
 * Fixed travis config to run Python 3.6 for lint run. Replaced the
virtualenv with_system_site_packages config with Travis specific Python
config value so lint run doesn't attempt to append with_system_site_packages
to Python 3.6 command.
2021-01-24 20:40:20 +00:00
Calum Lind eb57412601 [Tests] Fix tox, pytest and travis issues
* Error occurring with Pytest 5.4 so pin to below that version.
 * Fix minor issues with Travis config.
 * Use full command-switches for pytest in tox config.
 * Remove pin for pip as issue with pip-wheel-metadata was fixed in 19.3
 * Remove tox-venv as causing issues of incompatible packages installed.
   The latest versions of the virtualenv package should handle these
   duties.
2020-04-12 17:37:42 +01:00
Calum Lind 5f1eada3ea [Tests] Skip buggy pytest 5.2.3
Plugins test fails due to:

https://github.com/pytest-dev/pytest/issues/6194
2019-11-15 20:55:22 +00:00
Calum Lind 97e7d95dd3 Cleanup tox configuration
There were issues with dependencies and tox environments under Python 3
so refactored the tox configuration to be more consistent and clearer.

- Moved travis to default to Python 3 for linting and tests.
- Fixed missing mock for cairo in sphinx config.
- Collated the base deps sections to improve readability.
- Added PYTEST_ADDOPTS env to override pytest verbosity in just tox
  tests as this was a common option being used.
- Renamed env 'testcoverage' to the more concise 'coverage' and moved
  html creation under single env as handy to have this output as well
  as report.
- Cleaned up the isort config for gtk3.
- Added `bad-continuation` to pylint config as conflcts with black
  formatting.
- Fix isort issue with bbfreeze script. This will likely be removed
  in future so just skip sorting it.
2018-11-02 08:47:57 +00:00
Calum Lind 6973f96f8c [Tests] Update tox and CI configs
- Add new requirements files to make it easier to install deps.

- Tox changes
  - Update tox to use new requirements files.
  - Tweak heading styles.
  - Add development environment command `devenv`.
  - Remove testenv command as it would run on devenv creation.

- Travis changes
  - Now uses xenial as trusty is very old now.
  - Trial run disabled to speed up tests.
  - Add tox-venv for Python 3 support.
  - Only install testssl if running security tests.

- Appveyor
  - Add tox-venv for Python 3 support.
  - Use requirements file for non-tox.
  - Remove trial run to speed up testing.
2018-10-05 13:23:45 +01:00