Commits

Jason R. Coombs committed 8fa2746

Added test for help. Now make sure commands are built as unicode.

Comments (0)

Files changed (2)

pmxbot/commands.py

 					if aliases:
 						res += " (%s)" % ', '.join(aliases)
 					yield res
-		o = io.StringIO(" ".join(mk_entries()))
+		o = io.StringIO(u" ".join(mk_entries()))
 		more = o.read(160)
 		while more:
 			yield more

tests/unit/test_commands.py

 	def test_logo(self):
 		lines = list(commands.logo(c, e, '#test', 'testrunner', ''))
 		assert len(lines)
+
+	def test_help(self):
+		help = commands.help(c, e, '#test', 'testrunner', '')
+		result = ''.join(help)
+		assert 'help' in result