Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.61 KB | None | 0 0
  1. Test Failed:
  2. Testing RecommenderEngine.averages() with input:
  3. items = ['Tiger', 'Dog', 'Snake', 'Fireball']
  4. ratings = {'Liam': [0, 0, 0, 0], 'Man-Lin': [0, 0, 0, 0], 'Jose': [0, 0, 0, 0]}
  5.  
  6.  
  7. Second item of tuple {} in the list returned by RecommenderEngine.averages() is not a float. Found Item of type ('Tiger', 0)
  8.  
  9.  
  10. Test Failed:
  11. Testing RecommenderEngine.similarities() with input:
  12. name = hold
  13. ratings = {'quite': [0, 9, -4], 'our': [0, 2, -8], 'bell': [0, 7, 2], 'roll': [0, 10, -10], 'ear': [0, -5, -6], 'broke': [0, -4, -2], 'lie': [0, -5, -8], 'village': [0, -5, 2], 'sign': [0, 3, 14], 'game': [0, -8, -20], 'industry': [0, 10, -6], 'sky': [0, 5, 16], 'plan': [0, 0, 12], 'ring': [0, -1, 6], 'corner': [0, 7, 8], 'far': [0, -6, -6], 'skin': [0, -9, -6], 'level': [0, 1, -2], 'board': [0, 9, -20], 'feel': [0, -4, -8], 'hold': [0, 2, -12], 'bright': [0, 3, -20], 'short': [0, -7, -16], 'half': [0, 6, -10], 'dead': [0, -5, 14], 'division': [0, 6, 0], 'us': [0, 7, 20], 'fit': [0, -2, 6], 'picture': [0, 1, 10], 'colony': [0, -6, -14], 'oh': [0, -5, 12], 'run': [0, 10, 16], 'him': [0, -5, -12], 'few': [0, 1, -20], 'motion': [0, 8, -18], 'whose': [0, -9, 2], 'thousand': [0, -9, -6], 'back': [0, 1, -18], 'children': [0, 4, 2], 'protect': [0, 8, -12], 'event': [0, 10, -10], 'charge': [0, 5, -14], 'earth': [0, 1, -16], 'fruit': [0, -2, 10], 'she': [0, -2, 0], 'least': [0, -6, -2], 'act': [0, 10, 6], 'lady': [0, -6, -2], 'ran': [0, 10, 4], 'work': [0, -5, -8], 'determine': [0, -7, 12], 'silent': [0, 5, -20], 'wear': [0, -1, 18], 'press': [0, 0, 4], 'door': [0, -9, 14], 'fire': [0, 6, -8], 'family': [0, -9, 6], 'double': [0, 5, 0], 'written': [0, 7, -16], 'warm': [0, 8, -12], 'about': [0, -10, 0], 'by': [0, 0, 20], 'develop': [0, -9, -4], 'depend': [0, -6, 10], 'top': [0, -8, 10], 'feed': [0, -6, -4], 'control': [0, 0, -18], 'toward': [0, -4, 20], 'sun': [0, -2, -14], 'young': [0, 7, 16], 'this': [0, 6, -8], 'rock': [0, -8, 10], 'wire': [0, 0, -4], 'else': [0, -10, 20], 'has': [0, 10, 0], 'keep': [0, 10, -8], 'design': [0, 6, 8], 'nature': [0, 1, 18], 'and': [0, -1, 4], 'if': [0, -1, -12], 'apple': [0, 7, 10], 'common': [0, 9, -2], 'sudden': [0, -5, -4], 'mouth': [0, 6, 0], 'open': [0, 5, 20], 'test': [0, -5, -16], 'every': [0, -10, -8], 'triangle': [0, -3, -12], 'differ': [0, 0, -20], 'original': [0, -9, 20], 'than': [0, 10, 10], 'went': [0, 6, -4], 'correct': [0, -4, -6], 'band': [0, -2, -20]}
  14.  
  15.  
  16. The list returned is incorrectly sorted
  17. Expected:
  18. [('board', 258), ('silent', 250), ('bright', 246), ('few', 242), ('differ', 240), ('band', 236), ('motion', 232), ('game', 224), ('back', 218), ('control', 216), ('written', 206), ('earth', 194), ('test', 182), ('charge', 178), ('short', 178), ('sun', 164), ('protect', 160), ('warm', 160), ('colony', 156), ('if', 142), ('event', 140), ('roll', 140), ('triangle', 138), ('him', 134), ('half', 132), ('keep', 116), ('fire', 108), ('this', 108), ('our', 100), ('industry', 92), ('feel', 88), ('lie', 86), ('work', 86), ('every', 76), ('quite', 66), ('correct', 64), ('ear', 62), ('far', 60), ('went', 60), ('skin', 54), ('thousand', 54), ('wire', 48), ('common', 42), ('sudden', 38), ('feed', 36), ('develop', 30), ('level', 26), ('has', 20), ('broke', 16), ('division', 12), ('lady', 12), ('least', 12), ('mouth', 12), ('double', 10), ('she', -4), ('bell', -10), ('children', -16), ('about', -20), ('ran', -28), ('village', -34), ('whose', -42), ('press', -48), ('and', -50), ('act', -52), ('ring', -74), ('fit', -76), ('corner', -82), ('design', -84), ('family', -90), ('than', -100), ('apple', -106), ('picture', -118), ('fruit', -124), ('depend', -132), ('rock', -136), ('top', -136), ('plan', -144), ('oh', -154), ('determine', -158), ('sign', -162), ('run', -172), ('dead', -178), ('young', -178), ('sky', -182), ('door', -186), ('nature', -214), ('wear', -218), ('us', -226), ('open', -230), ('by', -240), ('toward', -248), ('original', -258), ('else', -260)]
  19. Received:
  20. [('board', 258), ('silent', 250), ('bright', 246), ('few', 242), ('differ', 240), ('band', 236), ('motion', 232), ('game', 224), ('back', 218), ('control', 216), ('written', 206), ('earth', 194), ('test', 182), ('short', 178), ('charge', 178), ('sun', 164), ('protect', 160), ('warm', 160), ('colony', 156), ('if', 142), ('roll', 140), ('event', 140), ('triangle', 138), ('him', 134), ('half', 132), ('keep', 116), ('fire', 108), ('this', 108), ('our', 100), ('industry', 92), ('feel', 88), ('lie', 86), ('work', 86), ('every', 76), ('quite', 66), ('correct', 64), ('ear', 62), ('far', 60), ('went', 60), ('skin', 54), ('thousand', 54), ('wire', 48), ('common', 42), ('sudden', 38), ('feed', 36), ('develop', 30), ('level', 26), ('has', 20), ('broke', 16), ('division', 12), ('least', 12), ('lady', 12), ('mouth', 12), ('double', 10), ('she', -4), ('bell', -10), ('children', -16), ('about', -20), ('ran', -28), ('village', -34), ('whose', -42), ('press', -48), ('and', -50), ('act', -52), ('ring', -74), ('fit', -76), ('corner', -82), ('design', -84), ('family', -90), ('than', -100), ('apple', -106), ('picture', -118), ('fruit', -124), ('depend', -132), ('top', -136), ('rock', -136), ('plan', -144), ('oh', -154), ('determine', -158), ('sign', -162), ('run', -172), ('dead', -178), ('young', -178), ('sky', -182), ('door', -186), ('nature', -214), ('wear', -218), ('us', -226), ('open', -230), ('by', -240), ('toward', -248), ('original', -258), ('else', -260)]
  21.  
  22.  
  23.  
  24.  
  25. Test Failed:
  26. Testing RecommenderMaker.makerecs() with input:
  27. name = student1001
  28. items = ["The Hitchhiker's Guide To The Galaxy", 'Watership Down', 'The Five People You Meet in Heaven', 'Speak', 'I Know Why the Caged Bird Sings', 'Thirteen Reasons Why', 'Foundation Series', 'The Sisterhood of the Travelling Pants', 'A Great and Terrible Beauty', 'The Da Vinci Code', 'The Princess Diaries', "Ender's Game", 'The Hunt for Red October', 'The Hunger Games', 'The Great Gatsby', "Ranger's Apprentice Series", 'Inkheart', 'Neuromancer', 'Lord of the Flies', 'The Princess Bride', 'Dinotopia: A Land Apart from Time', 'Far North', 'Practical Magic', 'Brave New World', 'The Summer Tree', 'Flowers For Algernon', 'Owl in Love', 'Naruto', 'Bleach (graphic novel)', 'Kiss the Dust', 'To Kill a Mockingbird', 'The Lion the Witch and the Wardrobe', 'The Bourne Series', 'Life of Pi', 'Breathless', 'Twilight Series', 'Sabriel', 'Nineteen Eighty-Four (1984)', 'Eragon', 'Hatchet', "My Sister's Keeper", 'The Golden Compass', 'Harry Potter Series', 'Holes', 'Shonen Jump Series', 'The Shadow Club', 'Bone Series', "Maus: A Survivor's Tale", 'The Joy Luck Club', 'The Lord of the Rings', 'The Hobbit', 'Shattered', 'The War Of The Worlds', 'Dealing with Dragons', 'The Chrysalids']
  29. ratings is too long to display
  30. size = 2
  31. top = 10
  32.  
  33. For the second element in the tuple:
  34.  
  35. Expected:
  36. [('Flowers For Algernon', 1055.0), ('Sabriel', 1055.0), ('The Lord of the Rings', 1042.5), ("My Sister's Keeper", 1030.0), ('Watership Down', 633.0), ('The Princess Bride', 618.0), ('Lord of the Flies', 419.5), ('The Great Gatsby', 414.5), ('Bleach (graphic novel)', 206.0), ('Speak', 206.0)]
  37. Receieved:
  38. [('Flowers For Algernon', 1055.0), ('Sabriel', 1055.0), ('The Lord of the Rings', 1042.5), ("My Sister's Keeper", 1030.0), ('Watership Down', 633.0), ('The Princess Bride', 618.0), ('Lord of the Flies', 419.5), ('The Great Gatsby', 414.5), ('The Chrysalids', 414.5), ('Speak', 206.0)]
  39.  
  40.  
  41.  
  42.  
  43.  
  44. Test Failed:
  45. Sorting failed when items had the same rating:
  46.  
  47.  
  48. Expected:
  49. ([('Bleach', 500.0), ('Harry Potter', 500.0), ('Lord of the Rings', 500.0), ('Naruto', 500.0)], [])
  50. Got:
  51. ([('Harry Potter', 500.0), ('Lord of the Rings', 500.0), ('Bleach', 500.0), ('Naruto', 500.0)], [])
  52. It's likely that you're not sorting items with equal rating correctly
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement