Commit Graph
26 Commits
Author SHA1 Message Date
mnightingale ec6ba3baae Speed up tests with pytest-xdist (#3546)
* Speed up tests with pytest-xdist

* Ignore request failures when the server disappeared

* Fix tests which modify module globals

* Fix lang change leaking

* Fix transaction compilation order breaking tests

* Always load a clean config and fix related tests

* No module globals

* Fix other test classes assigning module level by making calls

* Replace from sabnzbd.cfg import so monkeypatch works

* More global poisoning

* Fix dependant tests which worksteal breaks

* More global vars

* Drop loadscope until more failures are resolved

* Due to how pytest-xdist is implemented, the -s/--capture=no option does not work

* monkeypatch db_path

* Also patch startup_done

* loadscope
2026-08-10 17:44:18 +01:00
Safihre 5b3cf86f68 Track files during cleanup to prevent removing unrelated files (#3462)
* Track files during cleanup to prevent removing unrelated files

* Remove redundant path normalization

The `os.path.abspath` function already includes path normalization,
rendering the explicit call to `os.path.normpath` redundant
when used in conjunction. Removing it simplifies the code
without changing its behavior.
2026-06-25 15:01:41 +02:00
Safihre 0950393b82 Correctly format tests based on new rules and remove star imports 2026-06-05 14:34:17 +02:00
mnightingale 2184964d78 Reduce time to test (#3412)
* Remove UI delays

* Everything using set_config, set_platform, or pyfakefs

* tmp_path

* Scroll to top seems unnecessary but make it wait until it's done

* Remove sleep from test_rss_basic_flow

* Remove sleeps from test_daemonizing

* Define pytest markers

* Reduce sleep in test_queue_repair

* Remove sleeps from clean_cache_dir

* Suppress failures to connect during startup

* Reduce cache sleeps

* Reduce sleeps checking app started

* Reduce sleep removing cache dir
2026-05-13 18:49:41 +02:00
Safihre 2122503762 Update copyright to 2026 2026-02-09 16:44:38 +01:00
Safihre 3384beed24 Make black 26.1.0 happy again - almost 2026-01-19 12:42:51 +01:00
jcfp 4ffe0e27fb Handle weird anime episode notation (#3146)
* handle weird anime episode notation

* make black even happier /s
2025-09-15 22:55:07 +02:00
thezoggy dd0122865a bump copyright year (#3034) 2025-02-17 14:06:12 +01:00
Safihre 3b52379e56 Remove Windows 32bit support 2024-12-02 12:13:47 +01:00
jcfp 08b1b20b34 fix filesystem permission test for pyfakefs 5.4.0+ (#2905) 2024-07-10 16:16:18 +02:00
Safihre 820824e443 Disable failing test until #2883 is fixed 2024-07-08 13:47:01 +02:00
thezoggy 9f6a9f9912 normalize and update copyright year 2024-01-02 09:42:17 +01:00
Safihre 7cbbff727f Remove (almost) all references to unused team@sabnzbd.org 2023-07-21 11:33:51 +02:00
jcfp 07283ba9ab Fix sorting lowercasing (#2584)
* run lowercasing on season pack setname

* also subject %fn to lowercasing

* add tests

* woops
2023-06-03 16:45:41 +02:00
jcfpandSafihre d651f8db34 Replace series/date/movie sorters with a generic one + season pack handling (#2461)
* replace series/date/movie sorters with a generic sorter

* fix test_eval_sort on windoze

* unbreak and de-uglify the fix

* add special setting for season pack sorting

* remove unused import

* replace series/date/movie sorters with a generic sorter

* fix test_eval_sort on windoze

* unbreak and de-uglify the fix

* add special setting for season pack sorting

* remove unused import

* correct type for sort_type entries

* standardize ui

* add visual hints for drag-n-drop

* move presets directly below sort string field

* replace hex with ascii letters to avoid random occurences of (cd|e)[0-9]+

* Some styling things

---------

Co-authored-by: Safihre <safihre@sabnzbd.org>
2023-03-06 22:13:12 +01:00
Safihre 6492cfb430 Update copyright year to 2023 2023-01-25 22:39:49 +01:00
Safihre a63efcefd6 Make sure also short-dates are detected as YY-MM-DD in Sorting 2022-08-22 19:54:49 +02:00
Safihre 4d442159cb Remove unused code 2022-06-22 20:17:29 +02:00
Safihre 3496480254 Remove unused option movie_extra_folder 2022-05-17 10:29:27 +02:00
Safihre 6c6c8c86d8 Rename DARWIN constant to MACOS 2022-01-25 13:44:51 +01:00
Safihre 9c7b61070b Update copyright year to 2022 2022-01-07 09:29:32 +01:00
Safihre 389a0d3afa Revert to using regex based sample detection
Closes #1964
2021-10-13 18:24:55 +02:00
Safihre 5f44ec8a0d Correct behavior of Sorter when no filename and/or extension is supplied
Closes #1962, #1957
2021-10-08 10:35:06 +02:00
Safihre 82fa42d182 Correct sorting test 2021-07-28 14:26:08 +02:00
jcfp b2cbb8c8d0 Use guessit for sorting and sample detection (#1916)
* Use guessit for sorting and sample detection

* Fix bad logic in is_sample

* address comments, pt. 1

* address comments pt. 2

* address comments, pt. 3

* don't reference title before assignment

* whoops... overlooked the lowercasing

* add another title safeguard

* prevent uninitialized use of variable

* fix for jobs that should not be sorted

* don't list excluded guessit props in the interface

* insert linebreak between guessit props under pattern key

* use constant for excluded props

* dump COUNTRY_REP

* block rebulk log spam

* remove redundant season default; don't set for episodes

* make substitution regex a raw str
2021-06-30 17:08:54 +03:00
jcfp c366504868 add resolution pattern key to sorting (#1794) 2021-02-10 14:12:06 +01:00