From 530804a2cece21c336fe446b1553ae099910b149 Mon Sep 17 00:00:00 2001 From: Emmanuel Ogbizi-Ugbe Date: Thu, 12 Nov 2020 21:35:58 -0500 Subject: [PATCH] revert: 'chore: exclude more chars' --- src/syrupy/extensions/single_file.py | 3 +-- ...{}].raw => test_special_characters[.123~!@#$%^&()[]{}].raw} | 0 ...ace_space].raw => test_special_characters[space space].raw} | 0 ..._unicode[greek_u1ff4].raw => test_unicode[greek u1ff4].raw} | 0 4 files changed, 1 insertion(+), 2 deletions(-) rename tests/syrupy/extensions/__snapshots__/test_single_file/{test_special_characters[.123~!@#$^&()[]{}].raw => test_special_characters[.123~!@#$%^&()[]{}].raw} (100%) rename tests/syrupy/extensions/__snapshots__/test_single_file/{test_special_characters[space_space].raw => test_special_characters[space space].raw} (100%) rename tests/syrupy/extensions/__snapshots__/test_single_file/{test_unicode[greek_u1ff4].raw => test_unicode[greek u1ff4].raw} (100%) diff --git a/src/syrupy/extensions/single_file.py b/src/syrupy/extensions/single_file.py index 6e524059..edf64221 100644 --- a/src/syrupy/extensions/single_file.py +++ b/src/syrupy/extensions/single_file.py @@ -68,9 +68,8 @@ def _write_snapshot_fossil(self, *, snapshot_fossil: "SnapshotFossil") -> None: f.write(data) def __clean_filename(self, filename: str) -> str: - filename = str(filename).strip().replace(" ", "_") max_filename_length = 255 - len(self._file_extension or "") - exclude_chars = '\\/?%*:|"<>,;=' + exclude_chars = '\\/?*:|"<>' exclude_categ = ("C",) cleaned_filename = "".join( c diff --git a/tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[.123~!@#$^&()[]{}].raw b/tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[.123~!@#$%^&()[]{}].raw similarity index 100% rename from tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[.123~!@#$^&()[]{}].raw rename to tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[.123~!@#$%^&()[]{}].raw diff --git a/tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[space_space].raw b/tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[space space].raw similarity index 100% rename from tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[space_space].raw rename to tests/syrupy/extensions/__snapshots__/test_single_file/test_special_characters[space space].raw diff --git a/tests/syrupy/extensions/__snapshots__/test_single_file/test_unicode[greek_u1ff4].raw b/tests/syrupy/extensions/__snapshots__/test_single_file/test_unicode[greek u1ff4].raw similarity index 100% rename from tests/syrupy/extensions/__snapshots__/test_single_file/test_unicode[greek_u1ff4].raw rename to tests/syrupy/extensions/__snapshots__/test_single_file/test_unicode[greek u1ff4].raw