File: test_make_module_name.py

package info (click to toggle)
python-briefcase 0.3.22-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,300 kB
  • sloc: python: 59,405; makefile: 57
file content (16 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest


@pytest.mark.parametrize(
    "app_name, candidate",
    [
        ("helloworld", "helloworld"),
        ("HelloWorld", "HelloWorld"),
        ("hello-world", "hello_world"),
        ("hello_world", "hello_world"),
    ],
)
def test_make_module_name(new_command, app_name, candidate):
    """An app name can be converted into a valid class name."""
    module_name = new_command.make_module_name(app_name)
    assert module_name == candidate