def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.item1 = TextMenuItem(0.3807, 0.2604, "Text 1") self.item2 = TextMenuItem(0.3807, 0.2604, "Text 2", "Extra text 2") self.item3 = AnimatingMenuItem(0.3807, 0.2604, "Text 3", "Extra text 3")
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.progress_bar = ProgressBar(0.5, 0.9, 0.40, 0.04) self.media_player = MockMediaPlayer() self.progress_bar.media_player = self.media_player
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) filename = os.path.join(THIS_DIR, 'data/ImageThumbnailer/test.jpg') pix_buffer = gtk.gdk.pixbuf_new_from_file(filename) self.texture = RoundedTexture(0.5, 0.9, 0.40, 0.4, pix_buffer)
def setUp(self): '''see unittest.TestCase''' EntertainerTest.setUp(self) self.message_bus = MessageBus() port = 45054 # Default port self.connection = ConnectionServer(port, self.message_bus)
def setUp(self): """Set up the test""" EntertainerTest.setUp(self) self.filename = os.path.join(THIS_DIR, 'data/ImageThumbnailer/test.jpg') self.texture = Texture(self.filename, 0.1, 0.2)
def setUp(self): '''Set up the test''' EntertainerTest.setUp(self) # Not testing the callback because it is used by the transitions only # so just provide None self.factory = TransitionFactory(None)
def setUp(self): """Set up the test.""" EntertainerTest.setUp(self) filename = os.path.join(THIS_DIR, "data/ImageThumbnailer/test.jpg") pix_buffer = gtk.gdk.pixbuf_new_from_file(filename) self.texture = ReflectionTexture(0.5, 0.9, 0.40, 0.4, pix_buffer)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.player = MediaPlayer(clutter.Stage(), 100, 100) self.video_item = VideoItem() self.video_item.filename = THIS_DIR + '/data/VideoThumbnailer/test.avi' self.player.set_media(self.video_item)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.menu = ImageMenu(0, 0) self.texture = Texture(os.path.join( THIS_DIR, 'data/ImageThumbnailer/test.jpg'))
def tearDown(self): """Clean up after the test""" EntertainerTest.tearDown(self) connection = sqlite.connect(self.config.MUSIC_DB) cursor = connection.cursor() cursor.execute("""DROP TABLE IF EXISTS track""") connection.commit() connection.close()
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.filename = os.path.join(THIS_DIR, 'data/ImageThumbnailer/test.jpg') self.texture = Texture(self.filename) self.original_ratio = float(self.texture.get_width()) / \ self.texture.get_height() self.item = ImageMenuItem(0.2, 0.1, self.texture)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.screen = Screen() self.tabs_screen = Screen(has_tabs=True) self.tab = Tab('test') self.tabs_screen.add_tab(self.tab) self.select = UserEvent(UserEvent.NAVIGATE_SELECT)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.tab_group = TabGroup(0.95, 0.13, 'title') tab1 = Tab("tab1", "title1", None) self.tab2 = Tab("foo", "title2", None) self.tab_group.add_tab(tab1) self.tab_group.add_tab(self.tab2)
def setUp(self): EntertainerTest.setUp(self) image_libary = MockImageLibrary() music_library = MockMusicLibrary() media_player = MockMediaPlayer() video_library = MockVideoLibrary() self.factory = ScreenFactory(image_libary, music_library, video_library, media_player, None, None) self.kwargs = {}
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.menu = ScrollMenu(10, 60, 0.045, "menuitem_active") self.menu.set_name("mainmenu") self.menu.add_item(_("Play CD"), "disc") self.menu.add_item(_("Videos"), "videos") self.menu.add_item(_("Music"), "music") self.menu.add_item(_("Photographs"), "photo") self.menu.add_item(_("Headlines"), "rss")
def setUp(self): EntertainerTest.setUp(self) self.debug = False # The location of album art is required for some tests self.art_path = self.config.ALBUM_ART_DIR connection = sqlite.connect(self.config.MUSIC_DB) self.cursor = connection.cursor() self.cursor.execute("""DROP TABLE IF EXISTS track""") self.cursor.execute("""CREATE TABLE track( filename TEXT, title VARCHAR(255), artist VARCHAR(255), album VARCHAR(255), tracknumber INTEGER, bitrate INTEGER, year INTEGER, rating INTEGER DEFAULT NULL, length INTEGER, genre VARCHAR(128), comment TEXT, lyrics TEXT DEFAULT "", PRIMARY KEY(filename))""") # Populate the test database with enough information to make it useful for i in range(2): for j in range(2): for k in range(2): total = i + j + k # to get unique track numbers for albums db_row = ('/filename/%s' % str(i) + str(j) + str(k), 'title%s' % str(i) + str(j), 'artist0', 'album%d' % j, 'genre%d' % i, i + j + k, # length total, # tracknumber i, # bitrate 'comment%d' % i, i # year ) self.cursor.execute("""INSERT INTO track(filename, title, artist, album, genre, length, tracknumber, bitrate, comment, year) VALUES(?,?,?,?,?,?,?,?,?,?)""", db_row) connection.commit()
def setUp(self): """Set up the test.""" EntertainerTest.setUp(self) # Get a workable amount of text text = "Here is the start. " # pylint: disable-msg=W0612 for i in range(0, 100): text += "Here is sentence number " self.label = Label(0.1, "screentitle", 0.1, 0.2, text) self.scroll_area = ScrollArea(0.5, 0.6, 0.1, 0.1, self.label)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.menu = GridMenu(0, 0) self.cursor = clutter.Rectangle() self.item = MenuItem() self.item.userdata = "foo" self.menu.raw_add_item(MenuItem()) self.menu.raw_add_item(MenuItem()) self.menu.raw_add_item(self.item) self.menu.raw_add_item(MenuItem()) self.menu.items_per_row = 2 self.menu.items_per_col = 2 self.menu.visible_rows = 2 self.menu.visible_cols = 2
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.indicator = VolumeIndicator() clutter.Stage().add(self.indicator)
def setUp(self): """See unittest.TestCase""" EntertainerTest.setUp(self) self.debug = False
def tearDown(self): """Clean up after the test""" EntertainerTest.tearDown(self)
def tearDown(self): '''Clean up after the test.''' EntertainerTest.tearDown(self)
def setUp(self): """See unittest.TestCase""" EntertainerTest.setUp(self) self.debug = False self.filename = ( THIS_DIR + '/data/ImageThumbnailer/test.jpg')
def setUp(self): """Set up the test.""" EntertainerTest.setUp(self) self.buffer = MotionBuffer()
def setUp(self): EntertainerTest.setUp(self) self.filename = unicode(os.path.join(self.data_dir, self.filename))
def setUp(self): """Set up test""" self.NUMBER_OF_MESSAGE_TYPES = len( [k for k, v in vars(MessageType).items() if type(v) is int]) EntertainerTest.setUp(self)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.menu = TextMenu()
def setUp(self): """Set up the test""" EntertainerTest.setUp(self) self.theme = Theme(self.config.theme_path)
def setUp(self): """Sets up everything for the test""" EntertainerTest.setUp(self) self.weather = Weather("Bath,England")
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.item = MenuItem()
def setUp(self): """Set up the test""" EntertainerTest.setUp(self) self.label = Label(0.1, "screentitle", 0.1, 0.2, "Test Label text", "test_name")
def setUp(self): '''See unittest.TestCase''' EntertainerTest.setUp(self) self.logger = Logger()
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.test_resource = self.test_cfg_dir.replace('/', '') self.resources = Resources(resource=self.test_resource)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.arrow = ArrowTexture(0.5, 0.9, 0.40, (21, 45, 83, 255), (255, 0, 0, 255), ArrowTexture.UP)
def setUp(self): EntertainerTest.setUp(self) self.screen_history = ScreenHistory(None)
def setUp(self): '''Set up the test.''' EntertainerTest.setUp(self) self.buffer = MotionBuffer()
def tearDown(self): '''See unittest.TestCase''' EntertainerTest.tearDown(self)
def setUp(self): '''See unittest.TestCase''' EntertainerTest.setUp(self) self.debug = False
def setUp(self): """Set up the test""" EntertainerTest.setUp(self) self.base = Base()