示例#1
0
def test_runner_string__unittest():
    """Ensure the correct template and formatting is used for unittest."""

    conf = Config(
        test_runner="unittest is the default when provided nonsense",
        tests_dir="my_non_std_tests",
    )
    template_str = conf._test_runner_string()

    assert "import unittest" in template_str
    assert "my_non_std_tests" in template_str
示例#2
0
def test_runner_string__unittest():
    """Ensure the correct template and formatting is used for unittest."""

    conf = Config(
        test_runner="unittest is the default when provided nonsense",
        tests_dir="my_non_std_tests",
    )
    template_str = conf._test_runner_string()

    assert "import unittest" in template_str
    assert "my_non_std_tests" in template_str
示例#3
0
def test_runner_string(runner):
    """Ensure the correct template is used for nose and pytest."""

    conf = Config(test_runner=runner)
    template_str = conf._test_runner_string()
    assert "import {}".format(runner) in template_str
示例#4
0
def test_runner_string(runner):
    """Ensure the correct template is used for nose and pytest."""

    conf = Config(test_runner=runner)
    template_str = conf._test_runner_string()
    assert "import {}".format(runner) in template_str