2
# -*- coding: utf-8 -*-
10
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
11
sys.path.insert(0, ROOT)
13
import pygooglechart as gc
16
class TestBase(unittest.TestCase):
20
# All tests require warnings to be raised
21
self.raise_warnings(True)
23
self.temp_image = 'temp.png'
26
if os.path.exists(self.temp_image):
27
os.unlink(self.temp_image)
29
def raise_warnings(self, rw):
33
warnings.simplefilter('error')
35
# Don't print out warnings if we're expecting them--so we can have
36
# nicer looking tests! :)
37
warnings.simplefilter('ignore')
39
def assertChartURL(self, url, query):
40
self.assertTrue(url.endswith(query))