summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/HosterPluginTester.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/HosterPluginTester.py b/tests/HosterPluginTester.py
index 8e18c3eb9..f4d2c4dc4 100644
--- a/tests/HosterPluginTester.py
+++ b/tests/HosterPluginTester.py
@@ -15,7 +15,7 @@ from helper.PluginTester import PluginTester
from module.PyFile import PyFile
from module.plugins.Base import Fail
from module.utils import accumulate
-from module.utils.fs import save_join, join, exists, listdir, remove
+from module.utils.fs import save_join, join, exists, listdir, remove, stat
DL_DIR = join("Downloads", "tmp")
@@ -73,9 +73,11 @@ class HosterPluginTester(PluginTester):
if hash.hexdigest() != self.files[pyfile.name]:
log(DEBUG, "Hash is %s" % hash.hexdigest())
-
- # Copy for debug report
- move(f.name, join("tmp", plugin, f.name))
+
+ size = stat(f.name).st_size
+ if size < 1024 * 1024 * 10: # 10MB
+ # Copy for debug report
+ move(f.name, join("tmp", plugin, f.name))
raise Exception("Hash does not match.")