From 8555fa7640b2eb0b2502e188edadce5920c666e9 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 13 Apr 2014 13:26:51 -0700 Subject: [PATCH] skip pyechonest tests when library not installed --- test/test_echonest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test_echonest.py b/test/test_echonest.py index e77cacefe..da05adde3 100644 --- a/test/test_echonest.py +++ b/test/test_echonest.py @@ -22,8 +22,12 @@ from beets.library import Item class EchonestCliTest(unittest.TestCase, TestHelper): - def setUp(self): + try: + __import__('pyechonest') + except ImportError: + self.skipTest('pyechonest not available') + self.setup_beets() self.load_plugins('echonest')