Advertisement
lose311

ac test

Jul 24th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.28 KB | None | 0 0
  1. Test: get adopters for advertisement 1
  2. Your output:
  3. Testing getting adopters for advertisement 1
  4. new
  5. ac = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  6. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.04678405267169583, 'Dog': 0.5}}
  7. type: MedicatedAllergicAdopter
  8. One.score = 6.0
  9.  
  10. Two = {'name': 'Two', 'desired_species': 'Cat'}
  11. type: Adopter
  12. Two.score = 12.0
  13.  
  14. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  15. type: FlexibleAdopter
  16. Three.score = 3.6
  17.  
  18. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  19. type: FearfulAdopter
  20. Four.score = 11.4
  21.  
  22. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  23. type: SluggishAdopter
  24. Five.score = 10.6491207069
  25.  
  26. Six = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  27. type: AllergicAdopter
  28. Six.score = 0.0
  29.  
  30. Two
  31. Four
  32. Five
  33. One
  34. Three
  35. Six
  36. new
  37. ac = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  38. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.04678405267169583, 'Dog': 0.5}}
  39. type: MedicatedAllergicAdopter
  40. One.score = 12.0
  41.  
  42. Two = {'name': 'Two', 'desired_species': 'Cat'}
  43. type: Adopter
  44. Two.score = 12.0
  45.  
  46. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  47. type: FlexibleAdopter
  48. Three.score = 4.2
  49.  
  50. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  51. type: FearfulAdopter
  52. Four.score = 12.0
  53.  
  54. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  55. type: SluggishAdopter
  56. Five.score = 6.56649042404
  57.  
  58. Six = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  59. type: AllergicAdopter
  60. Six.score = 2.0
  61.  
  62. Four
  63. One
  64. Two
  65. Five
  66. Three
  67. Six
  68. new
  69. ac = {'location': (-2.0, 10.0), 'species_types': {'Dog': 1, 'Cat': 50}, 'name': 'Place3'}
  70. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.04678405267169583, 'Dog': 0.5}}
  71. type: MedicatedAllergicAdopter
  72. One.score = 25.0
  73.  
  74. Two = {'name': 'Two', 'desired_species': 'Cat'}
  75. type: Adopter
  76. Two.score = 50.0
  77.  
  78. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  79. type: FlexibleAdopter
  80. Three.score = 15.0
  81.  
  82. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  83. type: FearfulAdopter
  84. Four.score = 49.7
  85.  
  86. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  87. type: SluggishAdopter
  88. Five.score = 22.0870339381
  89.  
  90. Six = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  91. type: AllergicAdopter
  92. Six.score = 0.0
  93.  
  94. Two
  95. Four
  96. One
  97. Five
  98. Three
  99. Six
  100. Correct output:
  101. Testing getting adopters for advertisement 1
  102. Two
  103. Four
  104. Five
  105. One
  106. Three
  107. Six
  108. Four
  109. One
  110. Two
  111. Five
  112. Three
  113. Six
  114. Two
  115. Four
  116. One
  117. Five
  118. Three
  119. Six
  120. Test: get adopters for advertisement 2
  121. Your output:
  122. Testing getting adopters for advertisement 2
  123. new
  124. ac = {'location': (-3.0, 0.0), 'species_types': {'Horse': 4, 'Cat': 43}, 'name': 'Place4'}
  125. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.9708728227912564, 'Dog': 0.5}}
  126. type: MedicatedAllergicAdopter
  127. One.score = 41.74753138
  128.  
  129. Two = {'name': 'Two', 'desired_species': 'Cat'}
  130. type: Adopter
  131. Two.score = 43.0
  132.  
  133. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  134. type: FlexibleAdopter
  135. Three.score = 16.9
  136.  
  137. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  138. type: FearfulAdopter
  139. Four.score = 43.0
  140.  
  141. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  142. type: SluggishAdopter
  143. Five.score = 29.0962295107
  144.  
  145. Six = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  146. type: AllergicAdopter
  147. Six.score = 0.0
  148.  
  149. Four
  150. Two
  151. One
  152. Five
  153. Three
  154. Six
  155. new
  156. ac = {'location': (8.0, -2.0), 'species_types': {'Lizard': 1, 'Cat': 46}, 'name': 'Place5'}
  157. Two = {'name': 'Two', 'desired_species': 'Cat'}
  158. type: Adopter
  159. Two.score = 46.0
  160.  
  161. Two = {'name': 'Two', 'desired_species': 'Cat'}
  162. type: Adopter
  163. Two.score = 46.0
  164.  
  165. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  166. type: FlexibleAdopter
  167. Three.score = 14.1
  168.  
  169. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  170. type: FearfulAdopter
  171. Four.score = 46.0
  172.  
  173. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  174. type: SluggishAdopter
  175. Five.score = 20.3743887944
  176.  
  177. Six = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  178. type: AllergicAdopter
  179. Six.score = 1.0
  180.  
  181. Four
  182. Two
  183. Two
  184. Five
  185. Three
  186. Six
  187. new
  188. ac = {'location': (-10.0, 10.0), 'species_types': {'Horse': 1, 'Dog': 1, 'Cat': 49}, 'name': 'Place6'}
  189. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  190. type: FlexibleAdopter
  191. Three.score = 15.7
  192.  
  193. Two = {'name': 'Two', 'desired_species': 'Cat'}
  194. type: Adopter
  195. Two.score = 49.0
  196.  
  197. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  198. type: FlexibleAdopter
  199. Three.score = 15.7
  200.  
  201. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  202. type: FearfulAdopter
  203. Four.score = 48.7
  204.  
  205. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  206. type: SluggishAdopter
  207. Five.score = 8.45839501069
  208.  
  209. Six = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  210. type: AllergicAdopter
  211. Six.score = 0.0
  212.  
  213. Two
  214. Four
  215. Three
  216. Three
  217. Five
  218. Six
  219. Correct output:
  220. Testing getting adopters for advertisement 2
  221. Four
  222. Two
  223. One
  224. Five
  225. Three
  226. Six
  227. Four
  228. Two
  229. Two
  230. Three
  231. Five
  232. Six
  233. Two
  234. Four
  235. Five
  236. Three
  237. Three
  238. Six
  239. Test: get adopters for advertisement 3
  240. Your output:
  241. Testing getting adopters for advertisement 3
  242. new
  243. ac = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  244. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.8210705713946975, 'Dog': 0.5}}
  245. type: MedicatedAllergicAdopter
  246. One.score = 0.0
  247.  
  248. Two = {'name': 'Two', 'desired_species': 'Cat'}
  249. type: Adopter
  250. Two.score = 0.0
  251.  
  252. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  253. type: FlexibleAdopter
  254. Three.score = 0.0
  255.  
  256. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  257. type: FearfulAdopter
  258. Four.score = 0.0
  259.  
  260. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  261. type: SluggishAdopter
  262. Five.score = 0.0
  263.  
  264. Six = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  265. type: AllergicAdopter
  266. Six.score = 0.0
  267.  
  268. Five
  269. Four
  270. One
  271. Six
  272. Three
  273. Two
  274. new
  275. ac = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  276. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.8210705713946975, 'Dog': 0.5}}
  277. type: MedicatedAllergicAdopter
  278. One.score = 12.0
  279.  
  280. Two = {'name': 'Two', 'desired_species': 'Cat'}
  281. type: Adopter
  282. Two.score = 12.0
  283.  
  284. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  285. type: FlexibleAdopter
  286. Three.score = 4.2
  287.  
  288. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  289. type: FearfulAdopter
  290. Four.score = 12.0
  291.  
  292. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  293. type: SluggishAdopter
  294. Five.score = 7.33031238357
  295.  
  296. Six = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  297. type: AllergicAdopter
  298. Six.score = 12.0
  299.  
  300. Four
  301. One
  302. Six
  303. Two
  304. Five
  305. Three
  306. new
  307. ac = {'location': (-2.0, 10.0), 'species_types': {'Horse': 36, 'Dog': 6}, 'name': 'Place3'}
  308. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.8210705713946975, 'Dog': 0.5}}
  309. type: MedicatedAllergicAdopter
  310. One.score = 0.0
  311.  
  312. Two = {'name': 'Two', 'desired_species': 'Cat'}
  313. type: Adopter
  314. Two.score = 0.0
  315.  
  316. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  317. type: FlexibleAdopter
  318. Three.score = 36.0
  319.  
  320. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  321. type: FearfulAdopter
  322. Four.score = 0.0
  323.  
  324. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  325. type: SluggishAdopter
  326. Five.score = 0.0
  327.  
  328. Six = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  329. type: AllergicAdopter
  330. Six.score = 0.0
  331.  
  332. Three
  333. Five
  334. Four
  335. One
  336. Six
  337. Two
  338. Correct output:
  339. Testing getting adopters for advertisement 3
  340. Five
  341. Four
  342. One
  343. Six
  344. Three
  345. Two
  346. Four
  347. One
  348. Six
  349. Two
  350. Five
  351. Three
  352. Three
  353. Five
  354. Four
  355. One
  356. Six
  357. Two
  358. Test: get adopters for advertisement 4
  359. Your output:
  360. Testing getting adopters for advertisement 4
  361. new
  362. ac = {'location': (-3.0, 0.0), 'species_types': {'Horse': 10, 'Cat': 26}, 'name': 'Place4'}
  363. One = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.49722769897687447, 'Dog': 0.5}}
  364. type: MedicatedAllergicAdopter
  365. One.score = 12.9279201734
  366.  
  367. Two = {'name': 'Two', 'desired_species': 'Cat'}
  368. type: Adopter
  369. Two.score = 26.0
  370.  
  371. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  372. type: FlexibleAdopter
  373. Three.score = 17.8
  374.  
  375. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  376. type: FearfulAdopter
  377. Four.score = 26.0
  378.  
  379. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  380. type: SluggishAdopter
  381. Five.score = 15.7099802869
  382.  
  383. Six = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  384. type: AllergicAdopter
  385. Six.score = 26.0
  386.  
  387. Four
  388. Six
  389. Two
  390. Three
  391. Five
  392. One
  393. new
  394. ac = {'location': (8.0, -2.0), 'species_types': {'Lizard': 4, 'Dog': 21}, 'name': 'Place5'}
  395. Two = {'name': 'Two', 'desired_species': 'Cat'}
  396. type: Adopter
  397. Two.score = 0.0
  398.  
  399. Two = {'name': 'Two', 'desired_species': 'Cat'}
  400. type: Adopter
  401. Two.score = 0.0
  402.  
  403. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  404. type: FlexibleAdopter
  405. Three.score = 1.2
  406.  
  407. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  408. type: FearfulAdopter
  409. Four.score = 0.0
  410.  
  411. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  412. type: SluggishAdopter
  413. Five.score = 0.0
  414.  
  415. Six = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  416. type: AllergicAdopter
  417. Six.score = 0.0
  418.  
  419. Three
  420. Five
  421. Four
  422. Six
  423. Two
  424. Two
  425. new
  426. ac = {'location': (-10.0, 10.0), 'species_types': {'Horse': 1, 'Dog': 4, 'Cat': 37}, 'name': 'Place6'}
  427. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  428. type: FlexibleAdopter
  429. Three.score = 12.1
  430.  
  431. Two = {'name': 'Two', 'desired_species': 'Cat'}
  432. type: Adopter
  433. Two.score = 37.0
  434.  
  435. Three = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  436. type: FlexibleAdopter
  437. Three.score = 12.1
  438.  
  439. Four = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  440. type: FearfulAdopter
  441. Four.score = 35.8
  442.  
  443. Five = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  444. type: SluggishAdopter
  445. Five.score = 13.0100511575
  446.  
  447. Six = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  448. type: AllergicAdopter
  449. Six.score = 37.0
  450.  
  451. Six
  452. Two
  453. Four
  454. Five
  455. Three
  456. Three
  457. Correct output:
  458. Testing getting adopters for advertisement 4
  459. Four
  460. Six
  461. Two
  462. Three
  463. Five
  464. One
  465. Three
  466. Five
  467. Four
  468. Six
  469. Two
  470. Two
  471. Six
  472. Two
  473. Four
  474. Three
  475. Three
  476. Five
  477. Test: get ordered adoption center list 1
  478. Your output:
  479. Testing ordered adoption center listing
  480. new
  481. a = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.6885860026350474, 'Dog': 0.5}}
  482. adopter type: MedicatedAllergicAdopter
  483. Place1.score = 6.0
  484. Place1 = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  485.  
  486. Place2.score = 12.0
  487. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  488.  
  489. Place3.score = 22.0
  490. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Dog': 7, 'Cat': 44}, 'name': 'Place3'}
  491.  
  492. Place4.score = 18.5918220711
  493. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 5, 'Cat': 27}, 'name': 'Place4'}
  494.  
  495. Place5.score = 39.0
  496. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 2, 'Cat': 39}, 'name': 'Place5'}
  497.  
  498. Place6.score = 12.0
  499. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 5, 'Dog': 10, 'Cat': 24}, 'name': 'Place6'}
  500.  
  501. Place5
  502. Place3
  503. Place4
  504. Place2
  505. Place6
  506. Place1
  507. new
  508. a = {'name': 'Two', 'desired_species': 'Cat'}
  509. adopter type: Adopter
  510. Place1.score = 12.0
  511. Place1 = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  512.  
  513. Place2.score = 12.0
  514. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  515.  
  516. Place3.score = 44.0
  517. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Dog': 7, 'Cat': 44}, 'name': 'Place3'}
  518.  
  519. Place4.score = 27.0
  520. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 5, 'Cat': 27}, 'name': 'Place4'}
  521.  
  522. Place5.score = 39.0
  523. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 2, 'Cat': 39}, 'name': 'Place5'}
  524.  
  525. Place6.score = 24.0
  526. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 5, 'Dog': 10, 'Cat': 24}, 'name': 'Place6'}
  527.  
  528. Place3
  529. Place5
  530. Place4
  531. Place6
  532. Place1
  533. Place2
  534. new
  535. a = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  536. adopter type: FlexibleAdopter
  537. Place1.score = 3.6
  538. Place1 = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  539.  
  540. Place2.score = 4.2
  541. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  542.  
  543. Place3.score = 13.2
  544. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Dog': 7, 'Cat': 44}, 'name': 'Place3'}
  545.  
  546. Place4.score = 13.1
  547. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 5, 'Cat': 27}, 'name': 'Place4'}
  548.  
  549. Place5.score = 12.3
  550. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 2, 'Cat': 39}, 'name': 'Place5'}
  551.  
  552. Place6.score = 12.2
  553. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 5, 'Dog': 10, 'Cat': 24}, 'name': 'Place6'}
  554.  
  555. Place3
  556. Place4
  557. Place5
  558. Place6
  559. Place2
  560. Place1
  561. Correct output:
  562. Testing ordered adoption center listing
  563. Place5
  564. Place3
  565. Place4
  566. Place2
  567. Place6
  568. Place1
  569. Place3
  570. Place5
  571. Place4
  572. Place6
  573. Place1
  574. Place2
  575. Place3
  576. Place4
  577. Place5
  578. Place6
  579. Place2
  580. Place1
  581. Test: get ordered adoption center list 2
  582. Your output:
  583. Testing ordered adoption center listing 2
  584. new
  585. a = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  586. adopter type: FearfulAdopter
  587. Place1.score = 11.4
  588. Place1 = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  589.  
  590. Place2.score = 12.0
  591. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  592.  
  593. Place3.score = 23.1
  594. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Dog': 3, 'Cat': 24}, 'name': 'Place3'}
  595.  
  596. Place4.score = 31.0
  597. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 4, 'Cat': 31}, 'name': 'Place4'}
  598.  
  599. Place5.score = 39.0
  600. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 3, 'Cat': 39}, 'name': 'Place5'}
  601.  
  602. Place6.score = 42.4
  603. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 10, 'Dog': 2, 'Cat': 43}, 'name': 'Place6'}
  604.  
  605. Place6
  606. Place5
  607. Place4
  608. Place3
  609. Place2
  610. Place1
  611. new
  612. a = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  613. adopter type: SluggishAdopter
  614. Place1.score = 9.70688703933
  615. Place1 = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  616.  
  617. Place2.score = 8.19593362557
  618. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  619.  
  620. Place3.score = 11.3051660561
  621. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Dog': 3, 'Cat': 24}, 'name': 'Place3'}
  622.  
  623. Place4.score = 17.7689124199
  624. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 4, 'Cat': 31}, 'name': 'Place4'}
  625.  
  626. Place5.score = 10.6697313339
  627. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 3, 'Cat': 39}, 'name': 'Place5'}
  628.  
  629. Place6.score = 16.1258002256
  630. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 10, 'Dog': 2, 'Cat': 43}, 'name': 'Place6'}
  631.  
  632. Place4
  633. Place1
  634. Place2
  635. Place6
  636. Place5
  637. Place3
  638. new
  639. a = {'allergic_species': 'Cat', 'name': 'Six', 'desired_species': 'Lizard'}
  640. adopter type: AllergicAdopter
  641. Place1.score = 0.0
  642. Place1 = {'location': (1.0, 1.0), 'species_types': {'Dog': 2, 'Cat': 12}, 'name': 'Place1'}
  643.  
  644. Place2.score = 2.0
  645. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  646.  
  647. Place3.score = 0.0
  648. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Dog': 3, 'Cat': 24}, 'name': 'Place3'}
  649.  
  650. Place4.score = 0.0
  651. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 4, 'Cat': 31}, 'name': 'Place4'}
  652.  
  653. Place5.score = 3.0
  654. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 3, 'Cat': 39}, 'name': 'Place5'}
  655.  
  656. Place6.score = 0.0
  657. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 10, 'Dog': 2, 'Cat': 43}, 'name': 'Place6'}
  658.  
  659. Place5
  660. Place2
  661. Place1
  662. Place3
  663. Place4
  664. Place6
  665. Correct output:
  666. Testing ordered adoption center listing 2
  667. Place6
  668. Place5
  669. Place4
  670. Place3
  671. Place2
  672. Place1
  673. Place4
  674. Place6
  675. Place5
  676. Place3
  677. Place1
  678. Place2
  679. Place5
  680. Place2
  681. Place1
  682. Place3
  683. Place4
  684. Place6
  685. Test: get ordered adoption center list 3
  686. Your output:
  687. Testing ordered adoption center listing 3
  688. new
  689. a = {'allergic_species': ['Dog', 'Horse'], 'name': 'One', 'desired_species': 'Cat', 'medicine_effectiveness': {'Horse': 0.0008959890531827774, 'Dog': 0.5}}
  690. adopter type: MedicatedAllergicAdopter
  691. Place1.score = 0.0
  692. Place1 = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  693.  
  694. Place2.score = 12.0
  695. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  696.  
  697. Place3.score = 0.0
  698. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Horse': 48, 'Dog': 4}, 'name': 'Place3'}
  699.  
  700. Place4.score = 0.0250876934891
  701. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 8, 'Cat': 28}, 'name': 'Place4'}
  702.  
  703. Place5.score = 0.0
  704. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 3, 'Dog': 20}, 'name': 'Place5'}
  705.  
  706. Place6.score = 0.0313596168614
  707. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 5, 'Dog': 3, 'Cat': 35}, 'name': 'Place6'}
  708.  
  709. Place2
  710. Place6
  711. Place4
  712. Place1
  713. Place3
  714. Place5
  715. new
  716. a = {'name': 'Two', 'desired_species': 'Cat'}
  717. adopter type: Adopter
  718. Place1.score = 0.0
  719. Place1 = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  720.  
  721. Place2.score = 12.0
  722. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  723.  
  724. Place3.score = 0.0
  725. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Horse': 48, 'Dog': 4}, 'name': 'Place3'}
  726.  
  727. Place4.score = 28.0
  728. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 8, 'Cat': 28}, 'name': 'Place4'}
  729.  
  730. Place5.score = 0.0
  731. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 3, 'Dog': 20}, 'name': 'Place5'}
  732.  
  733. Place6.score = 35.0
  734. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 5, 'Dog': 3, 'Cat': 35}, 'name': 'Place6'}
  735.  
  736. Place6
  737. Place4
  738. Place2
  739. Place1
  740. Place3
  741. Place5
  742. new
  743. a = {'name': 'Three', 'desired_species': 'Horse', 'considered_species': ['Lizard', 'Cat']}
  744. adopter type: FlexibleAdopter
  745. Place1.score = 0.0
  746. Place1 = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  747.  
  748. Place2.score = 4.2
  749. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  750.  
  751. Place3.score = 48.0
  752. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Horse': 48, 'Dog': 4}, 'name': 'Place3'}
  753.  
  754. Place4.score = 16.4
  755. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 8, 'Cat': 28}, 'name': 'Place4'}
  756.  
  757. Place5.score = 0.9
  758. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 3, 'Dog': 20}, 'name': 'Place5'}
  759.  
  760. Place6.score = 15.5
  761. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 5, 'Dog': 3, 'Cat': 35}, 'name': 'Place6'}
  762.  
  763. Place3
  764. Place4
  765. Place6
  766. Place2
  767. Place5
  768. Place1
  769. Correct output:
  770. Testing ordered adoption center listing 3
  771. Place2
  772. Place6
  773. Place4
  774. Place1
  775. Place3
  776. Place5
  777. Place6
  778. Place4
  779. Place2
  780. Place1
  781. Place3
  782. Place5
  783. Place3
  784. Place4
  785. Place6
  786. Place2
  787. Place5
  788. Place1
  789. Test: get ordered adoption center list 4
  790. Your output:
  791. Testing ordered adoption center listing 4
  792. new
  793. a = {'feared_species': 'Dog', 'name': 'Four', 'desired_species': 'Cat'}
  794. adopter type: FearfulAdopter
  795. Place1.score = 0.0
  796. Place1 = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  797.  
  798. Place2.score = 12.0
  799. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  800.  
  801. Place3.score = 0.0
  802. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Horse': 27, 'Dog': 8}, 'name': 'Place3'}
  803.  
  804. Place4.score = 26.0
  805. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 10, 'Cat': 26}, 'name': 'Place4'}
  806.  
  807. Place5.score = 0.0
  808. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 2, 'Dog': 26}, 'name': 'Place5'}
  809.  
  810. Place6.score = 20.1
  811. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 8, 'Dog': 3, 'Cat': 21}, 'name': 'Place6'}
  812.  
  813. Place4
  814. Place6
  815. Place2
  816. Place1
  817. Place3
  818. Place5
  819. new
  820. a = {'name': 'Five', 'desired_species': 'Cat', 'location': (1, 2)}
  821. adopter type: SluggishAdopter
  822. Place1.score = 0.0
  823. Place1 = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  824.  
  825. Place2.score = 7.23597575262
  826. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  827.  
  828. Place3.score = 0.0
  829. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Horse': 27, 'Dog': 8}, 'name': 'Place3'}
  830.  
  831. Place4.score = 13.4300976487
  832. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 10, 'Cat': 26}, 'name': 'Place4'}
  833.  
  834. Place5.score = 0.0
  835. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 2, 'Dog': 26}, 'name': 'Place5'}
  836.  
  837. Place6.score = 5.05109206163
  838. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 8, 'Dog': 3, 'Cat': 21}, 'name': 'Place6'}
  839.  
  840. Place4
  841. Place2
  842. Place6
  843. Place1
  844. Place3
  845. Place5
  846. new
  847. a = {'allergic_species': 'Dog', 'name': 'Six', 'desired_species': 'Cat'}
  848. adopter type: AllergicAdopter
  849. Place1.score = 0.0
  850. Place1 = {'location': (1.0, 1.0), 'species_types': {'Mouse': 12, 'Dog': 2}, 'name': 'Place1'}
  851.  
  852. Place2.score = 12.0
  853. Place2 = {'location': (3.0, 5.0), 'species_types': {'Lizard': 2, 'Cat': 12}, 'name': 'Place2'}
  854.  
  855. Place3.score = 0.0
  856. Place3 = {'location': (-2.0, 10.0), 'species_types': {'Horse': 27, 'Dog': 8}, 'name': 'Place3'}
  857.  
  858. Place4.score = 26.0
  859. Place4 = {'location': (-3.0, 0.0), 'species_types': {'Horse': 10, 'Cat': 26}, 'name': 'Place4'}
  860.  
  861. Place5.score = 0.0
  862. Place5 = {'location': (8.0, -2.0), 'species_types': {'Lizard': 2, 'Dog': 26}, 'name': 'Place5'}
  863.  
  864. Place6.score = 21.0
  865. Place6 = {'location': (-10.0, 10.0), 'species_types': {'Horse': 8, 'Dog': 3, 'Cat': 21}, 'name': 'Place6'}
  866.  
  867. Place4
  868. Place6
  869. Place2
  870. Place1
  871. Place3
  872. Place5
  873. Correct output:
  874. Testing ordered adoption center listing 4
  875. Place4
  876. Place6
  877. Place2
  878. Place1
  879. Place3
  880. Place5
  881. Place4
  882. Place2
  883. Place6
  884. Place1
  885. Place3
  886. Place5
  887. Place4
  888. Place6
  889. Place2
  890. Place1
  891. Place3
  892. Place5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement