^^
This commit is contained in:
parent
d71d4f3309
commit
0bc81a1b7a
3
.idea/gestionParking.iml
generated
3
.idea/gestionParking.iml
generated
@ -2,8 +2,7 @@
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.4.2 (/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.1 (/usr/bin/python3.4)" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.2 (/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
|
||||
|
38
src/m/place.py
Normal file
38
src/m/place.py
Normal file
@ -0,0 +1,38 @@
|
||||
from src.m.placement import Placement
|
||||
class Place:
|
||||
def __init__(self):
|
||||
self._numero
|
||||
self._niveau
|
||||
self._longueur
|
||||
self._estLibre
|
||||
self.hauteur
|
||||
|
||||
@property
|
||||
def numero(self):
|
||||
return self._numero
|
||||
@property
|
||||
def niveau(self):
|
||||
return self._niveau
|
||||
@property
|
||||
def longueur(self):
|
||||
return self.longueur
|
||||
@property
|
||||
def estLibre(self):
|
||||
return self.estLibre
|
||||
@property
|
||||
def hauteur(self):
|
||||
return self.hauteur
|
||||
@numero.setter
|
||||
def setNumero(self, value):
|
||||
self._numero = value
|
||||
@niveau.setter
|
||||
def setNiveau(self, value):
|
||||
self._numero = value
|
||||
@longueur.setter
|
||||
def setLongueur(self, value):
|
||||
self._longueur = value
|
||||
def addPlacement(self, jourDeb, moisDeb, anneeDeb, jourFin, moisFin, anneeFin):
|
||||
newplace = Placement()
|
||||
newplace.setDateDebut(jourDeb, moisDeb, anneeDeb)
|
||||
newplace.setDateFin(jourFin, moisFin, anneeFin)
|
||||
newplace.setEstEnCours(True)
|
35
src/m/placement.py
Normal file
35
src/m/placement.py
Normal file
@ -0,0 +1,35 @@
|
||||
import datetime
|
||||
class Placement:
|
||||
|
||||
def __init__(self):
|
||||
self._dateDebut
|
||||
self._dateFin
|
||||
self._estEnCours
|
||||
|
||||
@property
|
||||
def getDateDebut(self):
|
||||
return self._dateDebut
|
||||
|
||||
#@self._dateDebut.setter
|
||||
def setDateDebut(self, jour, mois, annee):
|
||||
self._dateDebut= datetime.date(jour, mois,annee)
|
||||
|
||||
#@self._DateFin.setter
|
||||
def setDateFin(self, jour, mois, annee):
|
||||
self._dateFin= datetime.date(jour, mois,annee)
|
||||
|
||||
#@estEnCours.setter
|
||||
def setEstEnCours(self, value):
|
||||
self._estEnCours = value
|
||||
|
||||
@property
|
||||
def estEnCours(self):
|
||||
return self._estEnCours
|
||||
|
||||
|
||||
def partirPlace(self, value):
|
||||
self.setEstEnCours(self, False)
|
||||
|
||||
@estEnCours.deleter
|
||||
def partirPlace(self):
|
||||
del self
|
2
src/m/test/client
Normal file
2
src/m/test/client
Normal file
@ -0,0 +1,2 @@
|
||||
class client:
|
||||
pass
|
@ -4,8 +4,6 @@ __author__ = 'sidya'
|
||||
|
||||
import nose
|
||||
class testCamera :
|
||||
def run(self):
|
||||
pass
|
||||
|
||||
def testTailleMax(self):
|
||||
c = Camera()
|
||||
|
14
src/m/test/testClient.py
Normal file
14
src/m/test/testClient.py
Normal file
@ -0,0 +1,14 @@
|
||||
__author__ = 'nadiel'
|
||||
|
||||
import nose
|
||||
class testClient :
|
||||
#def testsAbonner:
|
||||
|
||||
def testnouvelleVoiture(self):
|
||||
assert()
|
||||
#v = Voiture()
|
||||
|
||||
|
||||
#def testTailleMax(self):
|
||||
# c = Camera()
|
||||
# assert (c.capturerHauteur()>1.5)
|
5
src/m/test/testPlacement
Normal file
5
src/m/test/testPlacement
Normal file
@ -0,0 +1,5 @@
|
||||
from src.m.placement import Placement
|
||||
class testPlacement:
|
||||
def test_init(self):
|
||||
newPlacement = Placement()
|
||||
|
40
src/m/voiture.py
Normal file
40
src/m/voiture.py
Normal file
@ -0,0 +1,40 @@
|
||||
__author__ = 'nadiel'
|
||||
|
||||
class Voiture():
|
||||
def __init__(self):
|
||||
self._hauteur
|
||||
self._longueur
|
||||
self._immatriculation
|
||||
self._estDansParking
|
||||
|
||||
# @hauteur.setter
|
||||
def setHauteur(self, value):
|
||||
self._hauteur=value
|
||||
|
||||
@property
|
||||
def getHauteur(self):
|
||||
return self._hauteur
|
||||
|
||||
# @longueur.setter
|
||||
def setLongueur(self, value):
|
||||
self._longueur=value
|
||||
|
||||
# @immatriculation.setter
|
||||
def setImmatriculation(self, chaine):
|
||||
self._immatriculation = chaine
|
||||
|
||||
@property
|
||||
def getImmatriculation(self):
|
||||
return self._immatriculation
|
||||
|
||||
#@estDansParking.setter
|
||||
def setEstDansParking(self, value):
|
||||
self._estDansParking =value
|
||||
|
||||
@property
|
||||
def estDansParking(self):
|
||||
return self._estDansParking == True
|
||||
|
||||
#def addPlacement(self, placement):
|
||||
|
||||
|
Reference in New Issue
Block a user