James R. Barlow
089f46690a
Enable ruff PTH (flake8-use-pathlib) and fix all findings
...
Replaces os.path/open()/os.stat()/os.chmod() calls with their Path
method equivalents across src, tests, misc, and bin, wrapping str
variables in Path(...) where they must stay str for other uses (e.g.
subprocess argv, CLI-arg formatting). helpers.safe_symlink() now
decodes StrOrBytesPath to a str Path via os.fsdecode() upfront, same
pattern already used elsewhere for the str|bytes union.
2026-07-16 00:52:57 -07:00
James R. Barlow
18b59c57b4
Refactor our tests that check if we are in a container
2024-10-27 11:55:22 -07:00
James R. Barlow
05ecb6ca46
Resolve Windows errors with -dPDFSTOPONERROR
2023-06-02 02:48:38 -07:00
James R. Barlow
1a0a797ca6
Remove our @deprecated decorator and use standard package
2022-08-04 04:00:25 -07:00
James R. Barlow
580822a6a2
Fix Windows ghostscript path scanning
2022-08-02 14:39:23 -07:00
James R. Barlow
80ed2117cc
Change to SPDX license tracking
2022-07-28 01:10:07 -07:00
James R. Barlow
dc6f1a266a
Modernize type annotations
2022-07-23 00:39:24 -07:00
James R. Barlow
5cba68b93d
tests: Don't require symlink permissions on Windows
...
Some of tests required symlink permissions, which CI workers have but typical Windows
user accounts do not. Mostly these are just correctness tests.
2021-07-14 00:11:47 -07:00
James R. Barlow
9db9a3d6ec
helpers: improve test coverage of Resolution
2021-04-07 23:26:37 -07:00
James R. Barlow
173a80864d
Delinting
2021-04-07 02:09:45 -07:00
James R. Barlow
aa115a8be3
Remove pytest_helpers_namespace
2021-04-07 01:56:51 -07:00
James R. Barlow
babc76fa74
tests: assert that most patched functions are called
...
We were not actually checking if functions we patched we called when
expected.
2020-12-28 23:58:33 -08:00
James R. Barlow
3cba50bfbd
windows: look in registry for Tesseract and Ghostscript
2020-12-04 13:21:54 -08:00
James R. Barlow
aa0ec40102
Change license of all GPLv3 files to MPL-2.0
...
https://github.com/jbarlow83/OCRmyPDF/issues/600
2020-08-05 00:44:42 -07:00
James R. Barlow
48e2750551
Fix some tests that were failing in Docker
2020-06-21 01:48:13 -07:00
James R. Barlow
64891c2fc3
Pre-release delinting
2020-06-09 15:27:14 -07:00
James R. Barlow
fe156db41d
Merge branch 'release/v10' into trialmerge
2020-06-09 15:12:56 -07:00
James R. Barlow
642ebc6098
Fix test that failed on Windows
2020-05-28 15:52:00 -07:00
James R. Barlow
df9f5157bd
Fix shim_paths to account for unexpected files in Program Files\gs
...
Fixes #565
2020-05-28 14:58:41 -07:00
James R. Barlow
25d2b0cda4
test: environment warnings/cleanup
2019-12-30 22:38:50 -08:00
James R. Barlow
b0e92760a2
tests: add coverage for helpers
2019-12-30 15:52:10 -08:00