Commit graph

30 commits

Author SHA1 Message Date
Šarūnas Nejus
7d7f16395c
Remove redundant library setUp instructions 2024-07-28 18:58:34 +01:00
Šarūnas Nejus
b64eaeda0a
Rename LibTestCase to ItemInDBTestCase 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
Šarūnas Nejus
de704125d8
test_ui_commands.py: make sure tearDown is run for FieldsTest 2024-07-12 20:32:18 +01:00
freddiewanah
67d14a2e12 remove extra setups in the test class 2024-04-09 16:46:35 +02: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
wisp3rwind
1ef6b90786 add missing syspath conversions (1/3, tests)
these are mostly in the tests, which didn't cause issues since the
affected directories usually have nice ASCII paths. For consistency, it
is nicer to always invoke syspath. That also avoids deprecation warnings
for the bytestring interfaces on Python <= 3.5. The bytestring
interfaces were undeprecated with PEP 529 in Python 3.6, such that we
didn't observe any actual failures.
2023-06-24 14:52:46 +02: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
ffa46a185c bytestring normalization
Make sure many/most strings that touch the filesystem are
converted explicitly to bytestrings rather than implictly.
2016-06-13 05:39:09 -04:00
Johnny Robeson
c52394c499 fix the rest of b'__main__': 2016-05-30 01:11:37 -04:00
wordofglass
0f89f17227 add missing division future imports 2016-04-16 18:33:54 +02:00
wordofglass
0cfddfaa8a add missing absolute_import future imports 2016-04-16 02:28:54 +02:00
wordofglass
6b43e1204f add missing print_function future imports 2016-04-16 01:53:39 +02:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00: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
Peter Kessen
59a1f8be01 extended test_fields_func to check output 2015-09-25 17:15:50 +02:00
Peter Kessen
8fc292bc44 Using LibTestCase instead of TestCase 2015-09-25 16:37:39 +02:00
Peter Kessen
888655413d added testcase for fields command
first check of function without check of consistent output
2015-09-20 12:54:46 +02:00
Peter Kessen
0f57c4acd5 fixed spaces at end of lines 2015-09-17 20:46:32 +02:00
Peter Kessen
db2ce36cc3 improved readability of test
implemented suggested method from @sampsyo
2015-09-17 20:31:37 +02:00
Peter Kessen
a9a49c6846 again ignoring unused return values 2015-09-17 13:08:34 +02:00
Peter Kessen
f46cc7d131 ignoring unused return values 2015-09-17 13:05:25 +02:00
Peter Kessen
c63db558e9 removed useless install of IO capture
This was introduced by a copy and paste from other code. I removed it now
2015-09-17 12:55:57 +02:00
Peter Kessen
d607ae7adc using asserRaises in test instead of previous workaround
used a workaround with try and except to check for a raised Exception before
2015-09-17 12:50:30 +02:00
Peter Kessen
57452624ae using local variable instead of object attribute 2015-09-17 12:47:22 +02:00
Peter Kessen
6fdf93b59d changed name of method to lowercase: add_item 2015-09-17 12:43:22 +02:00
Peter Kessen
4756f2878a corrected description of test case 2015-09-16 22:18:24 +02:00
Peter Kessen
be583cd63e added test for beets.ui.commands
* added test of _do_query method
2015-09-16 22:11:39 +02:00