Beispiel #1
0
	def test_build_palette(self):
		res = repo_manager.build_palette(self.def_pal)
		self.assertEquals(res[0], ('tag', 'yellow', 'dark blue', 'standout'))
		self.assertEquals(res[1], ('tag_data', 'white', 'black', 'standout'))
		self.assertEquals(res[2], ('custom_tag_title', 'light blue', 'black', 'standout'))
		self.assertEquals(len(res), len(self.def_pal))
Beispiel #2
0
	def test_build_palette(self):
		repo_manager.PALETTE_FILE = "./test.dat"
		res = repo_manager.build_palette(self.def_pal)
		self.assertEquals(self.def_pal, res)
Beispiel #3
0
	def main(self):
			self.ui = urwid.curses_display.Screen()
			self.ui.register_palette(repo_manager.build_palette(playlist.PlayList.PALETTE + browse.DirectoryBrowser.palette + Dispatcher.PALETTE + player.Player.PALETTE))
			self.ui.run_wrapper(self.run)
			os.system("clear")
			if self.error: print "\n".join(self.error)