diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py index a51a586ab..0940d67f9 100644 --- a/scrapy/commands/startproject.py +++ b/scrapy/commands/startproject.py @@ -98,9 +98,9 @@ class Command(ScrapyCommand): ProjectName=string_camelcase(project_name)) print("New Scrapy project %r, using template directory %r, created in:" % \ (project_name, self.templates_dir)) - print(" %s\n" % abspath(project_name)) + print(" %s\n" % abspath(project_dir)) print("You can start your first spider with:") - print(" cd %s" % project_name) + print(" cd %s" % project_dir) print(" scrapy genspider example example.com") @property diff --git a/tests/test_commands.py b/tests/test_commands.py index a487d14f7..ca7a19eaa 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -85,6 +85,8 @@ class StartprojectTest(ProjectTest): assert exists(join(join(abspath(project_dir), self.project_name), 'settings.py')) assert exists(join(join(abspath(project_dir), self.project_name), 'spiders', '__init__.py')) + self.assertEqual(0, self.call('startproject', self.project_name, project_dir + '2')) + self.assertEqual(1, self.call('startproject', self.project_name, project_dir)) self.assertEqual(1, self.call('startproject', self.project_name + '2', project_dir)) self.assertEqual(1, self.call('startproject', 'wrong---project---name'))