Ejemplo n.º 1
0
	def test_cas_particulier_1(self):
		"""Teste le cas particulier 1 sur les agendas"""
		a1 = Agenda("de base", 2016)
		a2 = Agenda("apres", 2016)
		importer(a1, "tests/fichiers/cas_particulier2.ics")
		importer(a2, "tests/fichiers/cas_particulier2_2.ics")
		
		d = Diff(a1, a2)
		d.comparer()
Ejemplo n.º 2
0
	def test_compare_meme_agendas(self):
		"""Teste la comparaison entre 2 agendas identiques"""
		a1 = Agenda("lol", 2015)
		a1.ajouterCreneau(2015, 11, 11, 8, 24, CP.CM)
		a1.ajouterCreneau(2015, 11, 11, 26, 32, CP.TP)
		a1.ajouterCreneau(2015, 12, 10, 26, 32, CP.TD)
		d = Diff(a1, a1)
		d.comparer()
		self.assertEqual(d.moments, [])
Ejemplo n.º 3
0
	def test_compare_gros_agendas_identiques(self):
		"""Teste la comparaison sur de gros agendas"""
		a1 = Agenda("olol", 2016)
		importer(a1, "tests/ADECal.ics")
		a2 = a1
		
		d = Diff(a1, a2)
		d.comparer()
		self.assertEqual(len(d.moments), 0)
Ejemplo n.º 4
0
	def test_compare_2_agendas_differents(self):
		"""Teste la comparaison entre 2 agendas identiques"""
		a1 = Agenda("agenda 1", 2015)
		a1.ajouterCreneau(2015, 11, 11, 8, 24, CP.CM)
		a1.ajouterCreneau(2015, 11, 11, 26, 32, CP.TP)
		a1.ajouterCreneau(2015, 12, 10, 26, 32, CP.TD)
		
		a2 = Agenda("agenda 2", 2015)
		a2.ajouterCreneau(2015, 11, 11, 8, 24, CP.CM)
		a2.ajouterCreneau(2015, 11, 11, 26, 32, CP.TP)
		a2.ajouterCreneau(2015, 8, 10, 26, 32, CP.TD)
		
		d = Diff(a1, a2)
		d.comparer()