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
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tests package for VibeVoice
60 changes: 60 additions & 0 deletions tests/test_package_naming.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env python3
"""
Test package naming consistency.

This test verifies that the vibevoice package follows Python packaging standards
by using consistent lowercase naming throughout.

Issue: https://github.com/microsoft/VibeVoice/issues/184
"""

import os
import sys
import unittest
from pathlib import Path


class TestPackageNaming(unittest.TestCase):
"""Test that package naming follows Python standards."""

def test_package_importable(self):
"""Test that vibevoice package can be imported."""
import vibevoice

self.assertIsNotNone(vibevoice)

def test_package_name_lowercase(self):
"""Test that package directory is lowercase."""
# Get the repository root (parent of this test file's location)
test_dir = Path(__file__).parent
repo_root = test_dir.parent.parent # tests/ -> vllm_plugin/ -> repo_root/

# Check that vibevoice directory exists and is lowercase
vibevoice_dir = repo_root / "vibevoice"
self.assertTrue(
vibevoice_dir.exists(),
f"vibevoice directory should exist at {vibevoice_dir}",
)
self.assertTrue(vibevoice_dir.is_dir(), "vibevoice should be a directory")

# Verify the directory name is lowercase
self.assertEqual(
vibevoice_dir.name,
"vibevoice",
"Package directory must be lowercase 'vibevoice'",
)

def test_imports_use_lowercase(self):
"""Test that all imports use lowercase vibevoice."""
import vibevoice.modular
import vibevoice.processor
import vibevoice.schedule

# Verify key modules are importable
self.assertIsNotNone(vibevoice.modular)
self.assertIsNotNone(vibevoice.processor)
self.assertIsNotNone(vibevoice.schedule)


if __name__ == "__main__":
unittest.main()