Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions tests/test_texture_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ def test_handles_windows_path(self):
self.assertEqual(result, "foo")


class TestStripIngestChannelSuffix(unittest.TestCase):
def test_strips_single_letter_suffixes(self):
for letter in "anrmheo":
self.assertEqual(
TextureProcessor._strip_ingest_channel_suffix(f"foo.{letter}"),
"foo",
msg=f"expected suffix .{letter} to be stripped",
)

def test_leaves_no_suffix(self):
self.assertEqual(TextureProcessor._strip_ingest_channel_suffix("foo"), "foo")

def test_leaves_multi_char_suffix(self):
self.assertEqual(TextureProcessor._strip_ingest_channel_suffix("foo.ab"), "foo.ab")


class TestConvertDdsToPng(unittest.TestCase):
def setUp(self):
self.tmpdir = tempfile.mkdtemp()
Expand Down
5 changes: 0 additions & 5 deletions texture_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ def _strip_known_texture_extensions(texture_path_or_name):
stem = os.path.splitext(stem)[0]
return stem

@staticmethod
def _strip_ingest_channel_suffix(stem):
if not stem: return ""
return re.sub(r"\.[armhnoaodse]$", "", str(stem), flags=re.IGNORECASE)

def convert_dds_to_png(self, texconv_exe, dds_file, output_png_target_name_base, output_dir_override=None):
if not texconv_exe or not os.path.isfile(texconv_exe):
raise RuntimeError(f"texconv.exe path is not configured or invalid: {texconv_exe}")
Expand Down
Loading