divijbindlish / parse-torrent-name

Extract media information from a filename
MIT License
215 stars 60 forks source link

Test with Hyphen in the name is broken #21

Closed damolp closed 6 years ago

damolp commented 6 years ago

Came across while adding some tests:

AssertionError: u'Jack And The Cuckoo' != u'Jack And The Cuckoo-Clock Heart'
- Jack And The Cuckoo
+ Jack And The Cuckoo-Clock Heart
?                    ++++++++++++
iMac-27:git ladmin$ git clone https://github.com/divijbindlish/parse-torrent-name.git PTN
Cloning into 'PTN'...
remote: Counting objects: 294, done.
remote: Total 294 (delta 0), reused 0 (delta 0), pack-reused 294
Receiving objects: 100% (294/294), 50.57 KiB | 269.00 KiB/s, done.
Resolving deltas: 100% (149/149), done.
iMac-27:git ladmin$ cd PTN
iMac-27:PTN ladmin$ cd tests/
iMac-27:tests ladmin$ python test_parse.py 
Test: The Walking Dead S05E03 720p HDTV x264-ASAP[ettv]
Test: Hercules (2014) 1080p BrRip H264 - YIFY
Test: Dawn.of.the.Planet.of.the.Apes.2014.HDRip.XViD-EVO
Test: The Big Bang Theory S08E06 HDTV XviD-LOL [eztv]
Test: 22 Jump Street (2014) 720p BrRip x264 - YIFY
Test: Hercules.2014.EXTENDED.1080p.WEB-DL.DD5.1.H264-RARBG
Test: Hercules.2014.Extended.Cut.HDRip.XViD-juggs[ETRG]
Test: Hercules (2014) WEBDL DVDRip XviD-MAX
Test: WWE Hell in a Cell 2014 PPV WEB-DL x264-WD -={SPARROW}=-
Test: UFC.179.PPV.HDTV.x264-Ebi[rartv]
Test: Marvels Agents of S H I E L D S02E05 HDTV x264-KILLERS [eztv]
Test: X-Men.Days.of.Future.Past.2014.1080p.WEB-DL.DD5.1.H264-RARBG
Test: Guardians Of The Galaxy 2014 R6 720p HDCAM x264-JYK
Test: Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.WEB-DL.DD5.1
Test: Marvels Agents of S.H.I.E.L.D. S02E06 HDTV x264-KILLERS[ettv]
Test: Guardians of the Galaxy (CamRip / 2014)
Test: The.Walking.Dead.S05E03.1080p.WEB-DL.DD5.1.H.264-Cyphanix[rartv]
Test: Brave.2012.R5.DVDRip.XViD.LiNE-UNiQUE
Test: Lets.Be.Cops.2014.BRRip.XViD-juggs[ETRG]
Test: These.Final.Hours.2013.WBBRip XViD
Test: Downton Abbey 5x06 HDTV x264-FoV [eztv]
Test: Annabelle.2014.HC.HDRip.XViD.AC3-juggs[ETRG]
Test: Lucy.2014.HC.HDRip.XViD-juggs[ETRG]
Test: The Flash 2014 S01E04 HDTV x264-FUM[ettv]
Test: South Park S18E05 HDTV x264-KILLERS [eztv]
Test: The Flash 2014 S01E03 HDTV x264-LOL[ettv]
Test: The Flash 2014 S01E01 HDTV x264-LOL[ettv]
Test: Lucy 2014 Dual-Audio WEBRip 1400Mb
Test: Teenage Mutant Ninja Turtles (HdRip / 2014)
Test: Teenage Mutant Ninja Turtles (unknown_release_type / 2014)
Test: The Simpsons S26E05 HDTV x264 PROPER-LOL [eztv]
Test: 2047 - Sights of Death (2014) 720p BrRip x264 - YIFY
Test: Two and a Half Men S12E01 HDTV x264 REPACK-LOL [eztv]
Test: Dinosaur 13 2014 WEBrip XviD AC3 MiLLENiUM
Test: Teenage.Mutant.Ninja.Turtles.2014.HDRip.XviD.MP3-RARBG
Test: Dawn.Of.The.Planet.of.The.Apes.2014.1080p.WEB-DL.DD51.H264-RARBG
Test: Teenage.Mutant.Ninja.Turtles.2014.720p.HDRip.x264.AC3.5.1-RARBG
Test: Gotham.S01E05.Viper.WEB-DL.x264.AAC
Test: Into.The.Storm.2014.1080p.WEB-DL.AAC2.0.H264-RARBG
Test: Lucy 2014 Dual-Audio 720p WEBRip
Test: Into The Storm 2014 1080p BRRip x264 DTS-JYK
Test: Sin.City.A.Dame.to.Kill.For.2014.1080p.BluRay.x264-SPARKS
Test: WWE Monday Night Raw 3rd Nov 2014 HDTV x264-Sir Paul
Test: Jack.And.The.Cuckoo-Clock.Heart.2013.BRRip XViD
F
======================================================================
FAIL: test_parser (__main__.ParseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_parse.py", line 34, in test_parser
    self.assertEqual(result1, expected_result[key])
AssertionError: u'Jack And The Cuckoo' != u'Jack And The Cuckoo-Clock Heart'
- Jack And The Cuckoo
+ Jack And The Cuckoo-Clock Heart
?                    ++++++++++++

----------------------------------------------------------------------
Ran 1 test in 0.019s

FAILED (failures=1)
iMac-27:tests ladmin$ 
damolp commented 6 years ago

test_parse.py is using the system's PYTHONPATH... my bad