def test_finds_associated_test_modules_inside_new_tests_directory(self):
     new_tests_directory = "something"
     test_module_name = os.path.join(new_tests_directory, "test_module.py")
     project, test_class = ProjectAndTestClass(test_module_name)
     project.new_tests_directory = new_tests_directory
     assert project[test_module_name] is find_test_module(
         project, test_class)
    def test_finds_associated_test_modules_that_use_different_name_conventions(self):
        test_module_names = ["test_module.py", "testModule.py", "TestModule.py",
                             "tests_module.py", "testsModule.py", "TestsModule.py",
                             "module_test.py", "moduleTest.py", "ModuleTest.py",
                             "module_tests.py", "moduleTests.py", "ModuleTests.py"]

        for test_module_name in test_module_names:
            project, test_class = ProjectAndTestClass(test_module_name)
            assert project[test_module_name] is find_test_module(project, test_class)
    def test_finds_associated_test_modules_that_use_different_name_conventions(
            self):
        test_module_names = [
            "test_module.py", "testModule.py", "TestModule.py",
            "tests_module.py", "testsModule.py", "TestsModule.py",
            "module_test.py", "moduleTest.py", "ModuleTest.py",
            "module_tests.py", "moduleTests.py", "ModuleTests.py"
        ]

        for test_module_name in test_module_names:
            project, test_class = ProjectAndTestClass(test_module_name)
            assert project[test_module_name] is find_test_module(
                project, test_class)
 def test_finds_associated_test_modules_inside_new_tests_directory(self):
     new_tests_directory = "something"
     test_module_name = os.path.join(new_tests_directory, "test_module.py")
     project, test_class = ProjectAndTestClass(test_module_name)
     project.new_tests_directory = new_tests_directory
     assert project[test_module_name] is find_test_module(project, test_class)
 def test_finds_associated_test_modules_inside_test_directories(self):
     for test_module_dir in ["test", "tests"]:
         test_module_name = os.path.join(test_module_dir, "test_module.py")
         project, test_class = ProjectAndTestClass(test_module_name)
         assert project[test_module_name] is find_test_module(project, test_class)
 def test_finds_associated_test_modules_inside_test_directories(self):
     for test_module_dir in ["test", "tests"]:
         test_module_name = os.path.join(test_module_dir, "test_module.py")
         project, test_class = ProjectAndTestClass(test_module_name)
         assert project[test_module_name] is find_test_module(
             project, test_class)