Šarūnas Nejus
c9f98fca55
Use unittest.TestCase for tests that don't require the dir setup
2025-05-26 12:40:38 +01:00
valrus
80a10c7e4e
lint
2024-12-31 15:14:32 -08:00
valrus
7f469eea54
format
2024-12-31 15:13:42 -08:00
valrus
342ac283b6
improve names
2024-12-31 15:10:50 -08:00
valrus
21c734bff8
patch rather than overwriting Item
2024-12-31 14:50:44 -08:00
valrus
5882e2cf67
Fix sorting on missing int fields
2024-12-29 08:01:41 -08:00
Šarūnas Nejus
41907a96a6
Remove _common.album and use Album instead
2024-10-16 12:37:22 +01:00
Šarūnas Nejus
85a17ee503
Reformat the codebase
2024-09-21 11:57:48 +01:00
Šarūnas Nejus
46bdb84b46
Replace assertGreater and assertGreaterEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
6a3380bcb5
Replace assertLess and assertLessEqual
2024-08-12 08:43:43 +01:00
Šarūnas Nejus
9a05d27acf
Replace assertEqual
2024-08-12 08:43:42 +01:00
Šarūnas Nejus
0ecc345143
Replace assertTrue
2024-08-05 17:11:16 +01:00
Šarūnas Nejus
fcff5d72af
Remove def suite TestLoader definitions
2024-07-28 18:58:51 +01:00
Šarūnas Nejus
7d7f16395c
Remove redundant library setUp instructions
2024-07-28 18:58:34 +01:00
Šarūnas Nejus
3e278159ed
Dedupe TestHelper and _common.TestCase setup
2024-07-28 18:58:33 +01:00
freddiewanah
3045550368
remove redundant prints
2024-04-08 19:14:42 +08:00
Lars Kruse
508d28f66b
tests: move reusable test-related modules into the beets package
...
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
2024-01-15 19:40:57 +01:00
Serene-Arc
a6e5201ff3
Apply formatting tools to all files
...
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Andrew Rogl
1ec87a3bdd
pyupgrade beetsplug and tests
...
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Adrian Sampson
a88682e7bb
Undo from _common import unittest indirection
...
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
2016-11-26 18:46:44 -05:00
Johnny Robeson
9ed9faf246
add some b' to paths in sort tests
2016-06-02 18:52:32 -04:00
Adrian Sampson
71b9fd785c
Revert "Do __name__ comparison with bytes and not unicode"
...
This reverts commit 9c41c39913 .
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Adrian Sampson
e54c7eec3d
Standardize __future__ imports without parentheses
...
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
867dafea91
Removed unicode_literals form test_sort
2016-02-25 07:36:21 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Diego Moreda
455fd0e352
Fix sorting by nonexistent field ( #1734 ), tests
...
* Fix crash when sorting by nonexistent field.
* Add tests for queries with nonexistient fields for sorting.
2015-11-24 19:37:30 +01:00
Peter Kessen
3eb8008b11
added encoding as comment in files
...
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Tom Jaspers
18bd4471e4
Fix sorting of track numbers when case insensitive
...
`LOWER()` implicitly converted numerical columns to strings,
causing the ordering of ['1', '10', '2'] to be correct.
The type of the column is now checked in the sql query
using `CASE WHEN..` construct. This ensures the column is
only `LOWER()`'d when dealing with TEXT or BLOB.
- Add a test to check for the track number behavior
- Add changelog entry
Fix #1511
2015-07-05 19:56:14 +01:00
Lucas Duailibe
df89a68a99
Fixing sort by path ( fix #1451 )
2015-05-07 23:45:26 -03:00
Tom Jaspers
24e6ba3de8
Tests for case insensitive sort
...
- Changed old values to be capitalized (more natural)
- Introduced specific tests for case sensitivity which adds lower-values
2015-04-18 11:22:01 +02:00
Bruno Cauet
53c21330c2
All tests use unicode_literals
2015-01-20 15:58:02 +01:00
Bruno Cauet
9c41c39913
Do __name__ comparison with bytes and not unicode
2015-01-20 12:03:57 +01:00
Bruno Cauet
90b388b775
Use __future__ imports but unicode_literals everywhere
...
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
2902cda036
tests: use absolute imports everywhere
2015-01-19 12:25:15 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48
Happy 2015. ;)
...
See 7a410f636b
Command used:
git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Adrian Sampson
5f2ca0b75b
Rename smartartist to artist/albumartist ( #953 )
...
This is basically always what you want, so now you can just use the name of
the field without "smart".
2014-09-16 14:53:16 -07:00
Adrian Sampson
2795a01e28
Default sort configuration is global ( #953 )
...
It would be nice to cache the Sort object so we didn't have to re-parse this
every time...
2014-09-16 14:34:21 -07:00
Adrian Sampson
4870d7e0fa
Roll back fast flexible field sorts ( #953 )
...
Sad to see them go, but happy be rid of the SQL injection.
2014-09-13 17:16:12 -07:00
Adrian Sampson
bb4082fbfc
Style cleanup in sorting
2014-09-12 20:58:25 -07:00
Pierre Rust
18539b0bd1
Fix flake8 warnings.
2014-06-15 22:32:26 +02:00
Pierre Rust
69213ad574
Add tests for computed attributes.
2014-06-15 22:32:26 +02:00
Pierre Rust
728797718e
Add tests cases for sort on albums.
...
On fixed and flex attributes.
2014-06-15 22:32:26 +02:00
Pierre Rust
ad1c0b3831
Add unit tests for fixef and flex field sort
2014-06-15 22:32:26 +02:00