Commits

Jason R. Coombs committed 8b525f9

Rename tests to match newer module names

Comments (0)

Files changed (4)

irc/tests/test_bot.py

+import irc.bot
+
+class TestChannel(object):
+
+    def test_add_remove_nick(self):
+        channel = irc.bot.Channel()
+        channel.add_user('tester1')
+        channel.remove_user('tester1')
+        channel.add_user('tester1')
+        assert 'tester1' in channel.users()
+
+    def test_change_nick(self):
+        channel = irc.bot.Channel()
+        channel.add_user('tester1')
+        channel.change_nick('tester1', 'was_tester')
+
+    def test_has_user(self):
+        channel = irc.bot.Channel()
+        channel.add_user('tester1')
+        assert channel.has_user('Tester1')

irc/tests/test_client.py

+import datetime
+import random
+
+import irc.client
+
+def test_version():
+	assert 'VERSION' in vars(irc.client)
+	assert isinstance(irc.client.VERSION, tuple)
+	assert irc.client.VERSION, "No VERSION detected."
+
+def test_delayed_command_order():
+	"""
+	delayed commands should be sorted by delay time
+	"""
+	null = lambda: None
+	delays = [random.randint(0, 99) for x in xrange(5)]
+	cmds = sorted([
+		irc.client.DelayedCommand(delay, null, tuple())
+		for delay in delays
+	])
+	assert [c.delay.seconds for c in cmds] == sorted(delays)
+
+def test_periodic_command_fixed_delay():
+	"""
+	Test that we can construct a periodic command with a fixed initial
+	delay.
+	"""
+	fd = irc.client.PeriodicCommandFixedDelay.at_time(
+		at = datetime.datetime.now(),
+		delay = datetime.timedelta(seconds=2),
+		function = lambda: None,
+		arguments = [],
+		)
+	assert fd.due() == True
+	assert fd.next().due() == False

irc/tests/test_ircbot.py

-import irc.bot
-
-class TestChannel(object):
-
-    def test_add_remove_nick(self):
-        channel = irc.bot.Channel()
-        channel.add_user('tester1')
-        channel.remove_user('tester1')
-        channel.add_user('tester1')
-        assert 'tester1' in channel.users()
-
-    def test_change_nick(self):
-        channel = irc.bot.Channel()
-        channel.add_user('tester1')
-        channel.change_nick('tester1', 'was_tester')
-
-    def test_has_user(self):
-        channel = irc.bot.Channel()
-        channel.add_user('tester1')
-        assert channel.has_user('Tester1')

irc/tests/test_irclib.py

-import datetime
-import random
-
-import irc.client
-
-def test_version():
-	assert 'VERSION' in vars(irc.client)
-	assert isinstance(irc.client.VERSION, tuple)
-	assert irc.client.VERSION, "No VERSION detected."
-
-def test_delayed_command_order():
-	"""
-	delayed commands should be sorted by delay time
-	"""
-	null = lambda: None
-	delays = [random.randint(0, 99) for x in xrange(5)]
-	cmds = sorted([
-		irc.client.DelayedCommand(delay, null, tuple())
-		for delay in delays
-	])
-	assert [c.delay.seconds for c in cmds] == sorted(delays)
-
-def test_periodic_command_fixed_delay():
-	"""
-	Test that we can construct a periodic command with a fixed initial
-	delay.
-	"""
-	fd = irc.client.PeriodicCommandFixedDelay.at_time(
-		at = datetime.datetime.now(),
-		delay = datetime.timedelta(seconds=2),
-		function = lambda: None,
-		arguments = [],
-		)
-	assert fd.due() == True
-	assert fd.next().due() == False
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.