forked from pool/python-mutagen
- Use singlespec macros. - Drop fix-tests-tools-names.diff which is not needed anymore. - Add reduce-test-length.diff to reduce the number of iterations in a test that is repeated for each data test file, for every byte, so it only tests each file for the first 10 bytes. This way we reduce the time it takes to test mutagen (and the corresponding cpu usage in obs) from 1078 seconds (nearly 18 minutes) to 53 seconds (for each python version). OBS-URL: https://build.opensuse.org/request/show/486959 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mutagen?expand=0&rev=28
14 lines
597 B
Diff
14 lines
597 B
Diff
Index: mutagen-1.37/tests/test___init__.py
|
|
===================================================================
|
|
--- mutagen-1.37.orig/tests/test___init__.py
|
|
+++ mutagen-1.37/tests/test___init__.py
|
|
@@ -270,7 +270,7 @@ def iter_test_file_objects(fileobj):
|
|
# first figure out how much a successful attempt reads and how many
|
|
# file object operations it executes.
|
|
yield t
|
|
- for i in xrange(t.dataread):
|
|
+ for i in xrange(min(t.dataread, 10)):
|
|
yield _TestFileObj(fileobj, stop_after=i)
|
|
for i in xrange(t.operations):
|
|
yield _TestFileObj(fileobj, fail_after=i)
|