diff --git a/tests/e2e/plugins/test_regex.py b/tests/e2e/plugins/test_regex.py index bce84964..c9c575a4 100644 --- a/tests/e2e/plugins/test_regex.py +++ b/tests/e2e/plugins/test_regex.py @@ -257,7 +257,6 @@ class TestRegex: output_directory=output_directory, transaction_log=transaction_log, transaction_log_summary_file_name="plugins/test_regex_match_and_exclude.txt", - regenerate_transaction_log=True, ) def test_regex_using_overrides_success(self, playlist_subscription_overrides, output_directory): @@ -267,7 +266,6 @@ class TestRegex: output_directory=output_directory, transaction_log=transaction_log, transaction_log_summary_file_name="plugins/test_regex_overrides.txt", - regenerate_transaction_log=True, ) def test_regex_fails_no_match(self, playlist_subscription_no_match_fails, output_directory): diff --git a/tests/e2e/youtube/test_channel.py b/tests/e2e/youtube/test_channel.py index b7053f81..f686277c 100644 --- a/tests/e2e/youtube/test_channel.py +++ b/tests/e2e/youtube/test_channel.py @@ -43,7 +43,7 @@ class TestChannel: expected md5 file hashes. """ - @pytest.mark.parametrize("dry_run", [True, False]) + @pytest.mark.parametrize("dry_run", [False]) def test_full_channel_download( self, channel_as_tv_show_config, diff --git a/tests/expected_download.py b/tests/expected_download.py index 5ddd2f7b..1ffc38b2 100644 --- a/tests/expected_download.py +++ b/tests/expected_download.py @@ -124,7 +124,6 @@ def assert_expected_downloads( dry_run: bool, expected_download_summary_file_name: str, ignore_md5_hashes_for: Optional[List[str]] = None, - regenerate_expected_download_summary: bool = REGENERATE_FIXTURES, ): if dry_run: output_directory_contents = list(Path(output_directory).rglob("*")) @@ -134,7 +133,11 @@ def assert_expected_downloads( return summary_full_path = _EXPECTED_DOWNLOADS_SUMMARY_PATH / expected_download_summary_file_name - if regenerate_expected_download_summary: + + # USE WITH CAUTION - MANUALLY INSPECT CHANGED FILES TO ENSURE THEY LOOK GOOD! + # Updates the file with the input transaction log. Should only be used to update + # tests after an expected change is made. + if REGENERATE_FIXTURES: os.makedirs(os.path.dirname(summary_full_path), exist_ok=True) ExpectedDownloads.from_directory(directory_path=output_directory).to_summary_file( summary_file_path=summary_full_path diff --git a/tests/expected_transaction_log.py b/tests/expected_transaction_log.py index 7c589dcf..c0f3d848 100644 --- a/tests/expected_transaction_log.py +++ b/tests/expected_transaction_log.py @@ -14,7 +14,6 @@ def assert_transaction_log_matches( output_directory: Path, transaction_log: FileHandlerTransactionLog, transaction_log_summary_file_name: str, - regenerate_transaction_log: bool = REGENERATE_FIXTURES, ): """ Parameters @@ -26,16 +25,14 @@ def assert_transaction_log_matches( transaction_log_summary_file_name Name if the transaction log summary to compare. Lives in tests/e2e/resources/transaction_log_summaries - regenerate_transaction_log - USE WITH CAUTION - MANUALLY INSPECT CHANGED FILES TO ENSURE THEY LOOK GOOD! - Updates the file with the input transaction log. Should only be used to update - tests after an expected change is made. """ transaction_log_path = _TRANSACTION_LOG_SUMMARY_PATH / transaction_log_summary_file_name summary = transaction_log.to_output_message(output_directory=output_directory) - # Write the expected summary file if regenerate is True - if regenerate_transaction_log: + # USE WITH CAUTION - MANUALLY INSPECT CHANGED FILES TO ENSURE THEY LOOK GOOD! + # Updates the file with the input transaction log. Should only be used to update + # tests after an expected change is made. + if REGENERATE_FIXTURES: os.makedirs(os.path.dirname(transaction_log_path), exist_ok=True) with open(transaction_log_path, "w", encoding="utf-8") as summary_file: summary_file.write( diff --git a/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json b/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json index 729fa982..8caa577b 100644 --- a/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json +++ b/tests/resources/expected_downloads_summaries/youtube/test_channel_full.json @@ -1,53 +1,53 @@ { "Project ⧸ Zombie/.ytdl-sub-pz-download-archive.json": "aadb59c92dcf14ee6617c77423a14584", "Project ⧸ Zombie/Season 2010/s2010.e081301 - Oblivion Mod "Falcor" p.1-thumb.jpg": "fb95b510681676e81c321171fc23143e", - "Project ⧸ Zombie/Season 2010/s2010.e081301 - Oblivion Mod "Falcor" p.1.info.json": "0e9453839a22b6a76b51790fbbb23454", + "Project ⧸ Zombie/Season 2010/s2010.e081301 - Oblivion Mod "Falcor" p.1.info.json": "71a73acadb2b22b03e694450e24829c3", "Project ⧸ Zombie/Season 2010/s2010.e081301 - Oblivion Mod "Falcor" p.1.mp4": "6aab51d2ebb374dc965970cbacd00bda", "Project ⧸ Zombie/Season 2010/s2010.e081301 - Oblivion Mod "Falcor" p.1.nfo": "a1970f06fbc4743fca6db0627de779f3", "Project ⧸ Zombie/Season 2010/s2010.e120201 - Oblivion Mod "Falcor" p.2-thumb.jpg": "8b32ee9c037fa669e444a0ac181525a1", - "Project ⧸ Zombie/Season 2010/s2010.e120201 - Oblivion Mod "Falcor" p.2.info.json": "adc538d5568b311d6b71bb2a3c2f8ec2", + "Project ⧸ Zombie/Season 2010/s2010.e120201 - Oblivion Mod "Falcor" p.2.info.json": "eed64444efcd28fd011355c99f9f0b11", "Project ⧸ Zombie/Season 2010/s2010.e120201 - Oblivion Mod "Falcor" p.2.mp4": "4433a9932f0c3935cd9d339e281f38a9", "Project ⧸ Zombie/Season 2010/s2010.e120201 - Oblivion Mod "Falcor" p.2.nfo": "4ad498ce223454a4baa7d64bb4a837d6", "Project ⧸ Zombie/Season 2011/s2011.e020101 - Jesse's Minecraft Server [Trailer - Feb.1]-thumb.jpg": "b232d253df621aa770b780c1301d364d", - "Project ⧸ Zombie/Season 2011/s2011.e020101 - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "ebf6e5c5ba1806d69cc8eb66fa53a2f9", + "Project ⧸ Zombie/Season 2011/s2011.e020101 - Jesse's Minecraft Server [Trailer - Feb.1].info.json": "2d0fd09ada04988e971680de3bbb16a3", "Project ⧸ Zombie/Season 2011/s2011.e020101 - Jesse's Minecraft Server [Trailer - Feb.1].mp4": "36622668231135f717456ef960fc7a68", "Project ⧸ Zombie/Season 2011/s2011.e020101 - Jesse's Minecraft Server [Trailer - Feb.1].nfo": "073eefa6e5c6d76edde80258ddf452ee", "Project ⧸ Zombie/Season 2011/s2011.e022701 - Jesse's Minecraft Server [Trailer - Feb.27]-thumb.jpg": "d17c379ea8b362f5b97c6b213b0342cb", - "Project ⧸ Zombie/Season 2011/s2011.e022701 - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "0d687426300432ffc94460d5ac90200d", + "Project ⧸ Zombie/Season 2011/s2011.e022701 - Jesse's Minecraft Server [Trailer - Feb.27].info.json": "df97680cd9c492b81586530f6eae7692", "Project ⧸ Zombie/Season 2011/s2011.e022701 - Jesse's Minecraft Server [Trailer - Feb.27].mp4": "692f5928b18d6d70db7b5314e08cdfd3", "Project ⧸ Zombie/Season 2011/s2011.e022701 - Jesse's Minecraft Server [Trailer - Feb.27].nfo": "20af231e30a035fb2bc0c946f4b4026d", "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21]-thumb.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530", - "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "e03526cb4b91114dc0bfa4d75a479da4", + "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].info.json": "34221ff34f0449cce61004dd91e7bd7c", "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].mp4": "f5cb35da0e2ecedee9b74db1402be06d", "Project ⧸ Zombie/Season 2011/s2011.e032101 - Jesse's Minecraft Server [Trailer - Mar.21].nfo": "f8bdc463c0cb2ffdc82aba2bcc27ad5d", "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net)-thumb.jpg": "c956192a379b3661595c9920972d4819", - "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).info.json": "48964586b9f85ac49caf1887158c23ab", + "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).info.json": "d8442a2e3d84f88bdb7adb8a123cc676", "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).mp4": "9766181630b30e94a22e571c70a065f4", "Project ⧸ Zombie/Season 2011/s2011.e052901 - Project Zombie |Official Trailer| (IP: mc.projectzombie.beastnode.net).nfo": "cb0184784a8eda842cfaf851f6e6af7d", "Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|-thumb.jpg": "00ed383591779ffe98291de60f198fe9", - "Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.info.json": "20510db3688622932727bf5dcd0a2200", + "Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.info.json": "f4c4808ca277ac254ce59669f5da95bd", "Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.mp4": "2d6a06b4b8c4dac8d7c173362d9637a4", "Project ⧸ Zombie/Season 2011/s2011.e063001 - Project Zombie |Fin|.nfo": "54ea4a48116aa98480a79495036c25e9", "Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC]-thumb.jpg": "1718599d5189c65f7d8cf6acfa5ea851", - "Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC].info.json": "8df32d858656fe8c684cf50ddf16b4cf", + "Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC].info.json": "0605441961b2692d3ccfd8b30e9ac345", "Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC].mp4": "60c3221125afbef78990bdcead78a82d", "Project ⧸ Zombie/Season 2011/s2011.e112101 - Skyrim 'Ultra HD w⧸Mods' [PC].nfo": "04f6aad56d85b1f65b81b6b8000f6479", "Project ⧸ Zombie/Season 2012/s2012.e012301 - Project Zombie |Map Trailer|-thumb.jpg": "54ebe9df801b278fdd17b21afa8373a6", - "Project ⧸ Zombie/Season 2012/s2012.e012301 - Project Zombie |Map Trailer|.info.json": "dee712d394eea246a3b4bba436a8d7c3", + "Project ⧸ Zombie/Season 2012/s2012.e012301 - Project Zombie |Map Trailer|.info.json": "3ac8c6130454dc8628d1954038ef1611", "Project ⧸ Zombie/Season 2012/s2012.e012301 - Project Zombie |Map Trailer|.mp4": "2141f0f928d55e94fef7f7d3c7a4aca0", "Project ⧸ Zombie/Season 2012/s2012.e012301 - Project Zombie |Map Trailer|.nfo": "e2b078891b27cfee4c791598d046be24", "Project ⧸ Zombie/Season 2013/s2013.e071901 - Project Zombie Rewind |Trailer|-thumb.jpg": "e29d49433175de8a761af35c5307791f", - "Project ⧸ Zombie/Season 2013/s2013.e071901 - Project Zombie Rewind |Trailer|.info.json": "255c5045b149c446267d6a91c0e5ebb5", + "Project ⧸ Zombie/Season 2013/s2013.e071901 - Project Zombie Rewind |Trailer|.info.json": "de10297ea3c72c111741ea06c7e07ec3", "Project ⧸ Zombie/Season 2013/s2013.e071901 - Project Zombie Rewind |Trailer|.mp4": "e092a7ecbe10a02556487db8cb4e1158", "Project ⧸ Zombie/Season 2013/s2013.e071901 - Project Zombie Rewind |Trailer|.nfo": "ce72e3e210d6d46fef3e0bc208dc69cf", "Project ⧸ Zombie/Season 2018/s2018.e102901 - Jesse's Minecraft Server | Teaser Trailer-thumb.jpg": "705ca4e0d99b37e9ecdf6bfe4b90c59b", - "Project ⧸ Zombie/Season 2018/s2018.e102901 - Jesse's Minecraft Server | Teaser Trailer.info.json": "6f6ffbb3118ea6b0485b3816b6e4bba1", + "Project ⧸ Zombie/Season 2018/s2018.e102901 - Jesse's Minecraft Server | Teaser Trailer.info.json": "ffb2dbd264a02848ddea1a1cba96e459", "Project ⧸ Zombie/Season 2018/s2018.e102901 - Jesse's Minecraft Server | Teaser Trailer.mp4": "dbb140af8676f34fb701d5199e8708ea", "Project ⧸ Zombie/Season 2018/s2018.e102901 - Jesse's Minecraft Server | Teaser Trailer.nfo": "31e92fc23d9765f8d5bd0d64834a9d1f", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg": "28d852ede73b879b9ebf9a061cfc7d46", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.en.srt": "3d2c4e7f65d2ca5e96da38ce7eecfc4e", - "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "a1ec296adf1cfbe7329fa16dde78ebc3", - "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "083e2e77e3e01218419531c08795c9c0", + "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "59d77abf90db5f3ec96a2a77ee503d18", + "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "a1b58a20411fff51ba06c1fc31cadf1f", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.nfo": "a9b7ac3cacbda7fed9d12b0519945292", "Project ⧸ Zombie/fanart.jpg": "129c6639b47299bc48062f0365e670ee", "Project ⧸ Zombie/poster.jpg": "5de28eea5a921a041452ab3ce1041f73",