Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Commit

Permalink
assertequal
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Jul 9, 2017
1 parent 520ec12 commit 75a7204
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions tests/test_basicitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,32 +129,32 @@ def test_takability(self):
self.assertFalse(brd.takeable)
with self.assertRaises(ActionRefused) as x:
brd.move(p, p, verb="frob")
self.assertEquals("You can't frob board.", str(x.exception))
self.assertEqual("You can't frob board.", str(x.exception))
bx = basic.Boxlike("box")
self.assertTrue(bx.takeable)
bx.move(p, p)
bnk = bank.Bank("bank")
self.assertFalse(bnk.takeable)
with self.assertRaises(ActionRefused) as x:
bnk.move(p, p, verb="frob")
self.assertEquals("The bank won't budge.", str(x.exception))
self.assertEqual("The bank won't budge.", str(x.exception))
with self.assertRaises(ActionRefused) as x:
bnk.allow_item_move(p, verb="frob")
self.assertEquals("The bank won't budge.", str(x.exception))
self.assertEqual("The bank won't budge.", str(x.exception))
# now flip the flags around
bnk.takeable = True
bnk.allow_item_move(p)
bnk.move(p, p)
bx.takeable = False
with self.assertRaises(ActionRefused) as x:
bx.move(p, p, verb="frob")
self.assertEquals("You can't frob box.", str(x.exception))
self.assertEqual("You can't frob box.", str(x.exception))
brd.takeable = True
brd.move(p, p)
item.takeable = False
with self.assertRaises(ActionRefused) as x:
item.move(p, p, verb="frob")
self.assertEquals("You can't frob item.", str(x.exception))
self.assertEqual("You can't frob item.", str(x.exception))


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mudobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def test_linked_door_pair(self):
self.assertIs(loc1, loc2.exits["door_to_one"].target)
key = Key("key")
key.key_for(door_one_two)
self.assertEquals("555", key.key_code)
self.assertEqual("555", key.key_code)
pubsub1 = PubsubCollector()
pubsub2 = PubsubCollector()
loc1.get_wiretap().subscribe(pubsub1)
Expand Down Expand Up @@ -777,7 +777,7 @@ def test_do_verb(self):
j.do_command_verb("fart", ctx) # a soul emote
j.do_command_verb("take note", ctx) # a command verb
pubsub.sync()
self.assertEquals(["Julie farts.", "Julie takes a note."], listener.messages)
self.assertEqual(["Julie farts.", "Julie takes a note."], listener.messages)
self.assertEqual(1, j.inventory_size)


Expand Down
6 changes: 3 additions & 3 deletions tests/test_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,13 @@ def notify_action(self, parsed, actor):
self.assertTrue(chair_in_inventory.notify_called)
parsed, actor = chair.notify_args
self.assertIs(player, actor)
self.assertEquals("kerwaffle", parsed.verb)
self.assertEqual("kerwaffle", parsed.verb)
parsed, actor = player.notify_args
self.assertIs(player, actor)
self.assertEquals("kerwaffle", parsed.verb)
self.assertEqual("kerwaffle", parsed.verb)
parsed, actor = chair_in_inventory.notify_args
self.assertIs(player, actor)
self.assertEquals("kerwaffle", parsed.verb)
self.assertEqual("kerwaffle", parsed.verb)

def test_move_notify(self):
class LocationNotify(Location):
Expand Down

0 comments on commit 75a7204

Please sign in to comment.