void () { final PyTestCreationModel model = prepareAndCreateModel(); boolean p2k = LanguageLevel.forElement(myFixture.getFile()).isPython2(); TestRunnerService testRunnerService = TestRunnerService.getInstance(myFixture.getModule()); testRunnerService.setProjectConfiguration(PyTestFactory.id); checkResult(model, (p2k ? "create_tst_class.expected_pytest_2k.py" : "create_tst_class.expected_pytest_3k.py")); model.setClassName(""); model.setFileName("tests_no_class.py"); checkResult(model, "create_tst.expected.py"); }