-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
71 lines (42 loc) · 932 Bytes
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import unittest
import pyautogui
from config import *
from errors import *
from inven import Inventory
from GUI import GUI
from Crawler import *
class Item(object):
def __init__(self, name):
self.name = name
class TestInventory(unittest.TestCase):
def test_insert1(self):
i = Inventory()
i.insert("item", Item("item"))
self.assertTrue("item" in i)
def test_insert2(self):
i = Inventory()
i.insert("item", Item("item"))
self.assertTrue(0 in i)
if __name__ == "__main__":
unittest.main()
'''
print("\n" * 3)
monsters_killed = 0
inventory = Inventory()
buyable = (Sword, HealthPot, armor_factory(1))
p = Player(inventory)
gui = GUI(
inventory,
buyable,
p.damage,
p.defence,
p.max_health,
p.loc,
cur_room
)
get_loot({"gold": Gold(amount=STARTING_GOLD)})
dungeon = Dungeon()
gui.dungeon_config(dungeon)
p.floor = dungeon.current_floor
gui.master.mainloop()
'''