-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from JoshuaOndieki/develop
PEP8
- Loading branch information
Showing
16 changed files
with
171 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
__pycache__ | ||
venv | ||
.pyc | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from models.person import Person | ||
|
||
|
||
class Fellow(Person): | ||
def __init__(self,firstname,surname): | ||
# super().__init__(self,firstname,surname) | ||
self.firstname=firstname | ||
self.surname=surname | ||
self.firstname = firstname | ||
self.surname = surname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
from models.room import Room | ||
|
||
|
||
class LivingSpace(Room): | ||
def __init__(self,name): | ||
# super().__init__(self,name) | ||
self.name=name | ||
self.capacity=4 | ||
self.members=[] | ||
self.name = name | ||
self.capacity = 4 | ||
self.members = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
from models.room import Room | ||
|
||
|
||
class Office(Room): | ||
def __init__(self,name): | ||
# super().__init__(self,name) | ||
self.name=name | ||
self.capacity=6 | ||
self.members=[] | ||
self.name = name | ||
self.capacity = 6 | ||
self.members = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class Person(): | ||
def __init__(self, firstname,surname): | ||
def __init__(self, firstname, surname): | ||
self.firstname = firstname | ||
self.surname = surname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
class Room(): | ||
def __init__(self,name): | ||
self.name=name | ||
def __init__(self, name): | ||
self.name = name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from models.person import Person | ||
|
||
|
||
class Staff(Person): | ||
def __init__(self,firstname,surname): | ||
def __init__(self, firstname, surname): | ||
# super().__init__(self,firstname,surname) | ||
self.firstname=firstname | ||
self.surname=surname | ||
self.firstname = firstname | ||
self.surname = surname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from termcolor import colored | ||
|
||
|
||
def error(text): | ||
return colored('\t\t\t\t'+text,'red',attrs=['bold']) | ||
return colored('\t\t\t\t'+text, 'red', attrs=['bold']) | ||
|
||
|
||
def success(text): | ||
return colored('\t\t'+text,'green',attrs=['bold']) | ||
return colored('\t\t'+text, 'green', attrs=['bold']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import unittest | ||
from models.fellow import Fellow | ||
|
||
|
||
class TestFellow(unittest.TestCase): | ||
def test_creates_fellow_instance(self): | ||
self.fellow=Fellow('Joshua','Ondieki') | ||
self.assertTrue('Joshua'==self.fellow.firstname and 'Ondieki'==self.fellow.surname) | ||
self.fellow = Fellow('Joshua', 'Ondieki') | ||
self.assertTrue('Joshua' == self.fellow.firstname and 'Ondieki' == self.fellow.surname) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import unittest | ||
from models.livingspace import LivingSpace | ||
|
||
|
||
class TestLivingSpace(unittest.TestCase): | ||
def test_creates_livingspace_instance(self): | ||
self.livingspace=LivingSpace('Amity') | ||
self.assertEqual(self.livingspace.capacity,4) | ||
self.assertEqual(self.livingspace.members,[]) | ||
self.livingspace = LivingSpace('Amity') | ||
self.assertEqual(self.livingspace.capacity, 4) | ||
self.assertEqual(self.livingspace.members, []) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import unittest | ||
from models.office import Office | ||
|
||
|
||
class TestOffice(unittest.TestCase): | ||
def test_creates_office_instance(self): | ||
self.office=Office('Spire') | ||
self.assertEqual(self.office.capacity,6) | ||
self.assertEqual(self.office.members,[]) | ||
self.office = Office('Spire') | ||
self.assertEqual(self.office.capacity, 6) | ||
self.assertEqual(self.office.members, []) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
Oops, something went wrong.