Add project names

This commit is contained in:
Jake Howard 2018-12-18 15:34:57 +00:00
parent 53b3d29baa
commit c63c709c79
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 7 additions and 0 deletions

View file

@ -27,3 +27,7 @@ class Project:
def exists(self): def exists(self):
return self.root.exists() and self.root.is_dir() return self.root.exists() and self.root.is_dir()
@property
def name(self):
return self.root.name

View file

@ -19,3 +19,6 @@ class ProjectTestCase(BaseTestCase):
process = self.project.processes[0] process = self.project.processes[0]
self.assertEqual(process.name, "web") self.assertEqual(process.name, "web")
self.assertEqual(process.command, "python -m http.server $PORT") self.assertEqual(process.command, "python -m http.server $PORT")
def test_name(self):
self.assertEqual(self.project.name, 'example')