@@ -35,22 +35,20 @@ def test_utils() -> None:
3535 )
3636 c .calculate ()
3737
38- assert 22 == c .their_scrap
39- assert 12 == c .our_scrap
40-
41- assert {
38+ assert c .their_scrap == 22
39+ assert c .our_scrap == 12
40+ assert c .their_overview == {
4241 "Mann Co. Supply Crate Key" : 0 ,
4342 "Refined Metal" : 2 ,
4443 "Reclaimed Metal" : 1 ,
4544 "Scrap Metal" : 1 ,
46- } == c . their_overview
47- assert {
45+ }
46+ assert c . our_overview == {
4847 "Mann Co. Supply Crate Key" : 0 ,
4948 "Refined Metal" : 1 ,
5049 "Reclaimed Metal" : 1 ,
5150 "Scrap Metal" : 0 ,
52- } == c .our_overview
53-
51+ }
5452 assert not c .is_possible
5553
5654
@@ -68,7 +66,7 @@ def test_not_enough() -> None:
6866 )
6967 c .calculate ()
7068
71- assert 19 == c . their_scrap
69+ assert c . their_scrap == 19
7270 assert not c .is_possible
7371
7472
@@ -88,10 +86,9 @@ def test_no_combination() -> None:
8886 )
8987 c .calculate ()
9088
91- assert 18 == c .their_scrap
92- assert 12 == c .our_scrap
93-
94- # they have enough but there is no combo which would work
89+ assert c .their_scrap == 18
90+ assert c .our_scrap == 12
91+ # they have enough but there is no combination which would work
9592 assert not c .is_possible
9693
9794
@@ -116,34 +113,31 @@ def test_possible() -> None:
116113 )
117114 c .calculate ()
118115
119- assert 15 == c .their_scrap
120- assert 12 == c .our_scrap
121-
122- assert {
116+ assert c .their_scrap == 15
117+ assert c .our_scrap == 12
118+ assert c .their_overview == {
123119 "Mann Co. Supply Crate Key" : 0 ,
124120 "Refined Metal" : 1 ,
125121 "Reclaimed Metal" : 0 ,
126122 "Scrap Metal" : 6 ,
127- } == c . their_overview
128- assert {
123+ }
124+ assert c . our_overview == {
129125 "Mann Co. Supply Crate Key" : 0 ,
130126 "Refined Metal" : 1 ,
131127 "Reclaimed Metal" : 1 ,
132128 "Scrap Metal" : 0 ,
133- } == c .our_overview
134-
129+ }
135130 assert c .is_possible
136-
137131 # 0.44, but we pay 1 ref
138132 # that means they have to add 0.55
139- assert ["Refined Metal" ] == c . our_combination
140- assert [
133+ assert c . our_combination == ["Refined Metal" ]
134+ assert c . their_combination == [
141135 "Scrap Metal" ,
142136 "Scrap Metal" ,
143137 "Scrap Metal" ,
144138 "Scrap Metal" ,
145139 "Scrap Metal" ,
146- ] == c . their_combination
140+ ]
147141
148142
149143def test_best_possible () -> None :
@@ -169,31 +163,28 @@ def test_best_possible() -> None:
169163 )
170164 c .calculate ()
171165
172- assert KEY_RATE + 20 == c .their_scrap
173- assert 18 == c .our_scrap
174-
175- assert {
166+ assert c .their_scrap == KEY_RATE + 20
167+ assert c .our_scrap == 18
168+ assert c .their_overview == {
176169 "Mann Co. Supply Crate Key" : 1 ,
177170 "Refined Metal" : 1 ,
178171 "Reclaimed Metal" : 2 ,
179172 "Scrap Metal" : 5 ,
180- } == c . their_overview
181- assert {
173+ }
174+ assert c . our_overview == {
182175 "Mann Co. Supply Crate Key" : 0 ,
183176 "Refined Metal" : 2 ,
184177 "Reclaimed Metal" : 0 ,
185178 "Scrap Metal" : 0 ,
186- } == c .our_overview
187-
179+ }
188180 assert c .is_possible
189-
190- assert [
181+ assert c .their_combination == [
191182 "Scrap Metal" ,
192183 "Scrap Metal" ,
193184 "Reclaimed Metal" ,
194185 "Refined Metal" ,
195- ] == c . their_combination
196- assert [] == c . our_combination
186+ ]
187+ assert c . our_combination == []
197188
198189
199190def test_only_metal () -> None :
@@ -216,32 +207,29 @@ def test_only_metal() -> None:
216207 )
217208 c .calculate ()
218209
219- assert 9 == c .their_scrap
220- assert 18 == c .our_scrap
221-
222- assert {
210+ assert c .their_scrap == 9
211+ assert c .our_scrap == 18
212+ assert c .their_overview == {
223213 "Mann Co. Supply Crate Key" : 0 ,
224214 "Refined Metal" : 0 ,
225215 "Reclaimed Metal" : 2 ,
226216 "Scrap Metal" : 3 ,
227- } == c . their_overview
228- assert {
217+ }
218+ assert c . our_overview == {
229219 "Mann Co. Supply Crate Key" : 0 ,
230220 "Refined Metal" : 2 ,
231221 "Reclaimed Metal" : 0 ,
232222 "Scrap Metal" : 0 ,
233- } == c .our_overview
234-
223+ }
235224 assert c .is_possible
236-
237- assert [
225+ assert c .their_combination == [
238226 "Reclaimed Metal" ,
239227 "Reclaimed Metal" ,
240228 "Scrap Metal" ,
241229 "Scrap Metal" ,
242230 "Scrap Metal" ,
243- ] == c . their_combination
244- assert ["Refined Metal" ] == c . our_combination
231+ ]
232+ assert c . our_combination == ["Refined Metal" ]
245233
246234
247235def test_real_inventory () -> None :
@@ -257,34 +245,31 @@ def test_real_inventory() -> None:
257245
258246 c .calculate ()
259247
260- assert 591 == c .their_scrap
261- assert 0 == c .our_scrap
262-
263- assert {
248+ assert c .their_scrap == 591
249+ assert c .our_scrap == 0
250+ assert c .their_overview == {
264251 "Mann Co. Supply Crate Key" : 0 ,
265252 "Refined Metal" : 65 ,
266253 "Reclaimed Metal" : 1 ,
267254 "Scrap Metal" : 3 ,
268- } == c . their_overview
269- assert {
255+ }
256+ assert c . our_overview == {
270257 "Mann Co. Supply Crate Key" : 0 ,
271258 "Refined Metal" : 0 ,
272259 "Reclaimed Metal" : 0 ,
273260 "Scrap Metal" : 0 ,
274- } == c .our_overview
275-
261+ }
276262 assert c .is_possible
277-
278- assert [
263+ assert c .their_combination == [
279264 "Reclaimed Metal" ,
280265 "Scrap Metal" ,
281266 "Scrap Metal" ,
282267 "Scrap Metal" ,
283268 "Refined Metal" ,
284- ] == c . their_combination
285- assert [] == c . our_combination
269+ ]
270+ assert c . our_combination == []
286271
287272 their_items , our_items = c .get_currencies ()
288273
289- assert PICKED_METALS == their_items
290- assert [] == our_items
274+ assert their_items == PICKED_METALS
275+ assert our_items == []
0 commit comments