def menu(): cleaner.clear() logo.logo() print(""" Opciones disponibles: 1 => Ingresar datos de la línea 2 => Hacer resumen 3 => Reiniciar semana 4 => Consultas parciales 5 => Salir """) option = input("Ingresa alguna de las opciones =>") if(option == '1'): import addData elif(option == '2'): import makeSumary elif(option == '3'): import rebootWeek elif(option == '4'): import partialConsult elif(option == '5'): pass return 'false' else: print("No existe ninguna opcion para esto")
def test_clear_location_with_expired_lock(self): path_fo = os.path.join(self.location, '1_left.lock') lock_file = os.path.join(path_fo, 'lock') os.makedirs(path_fo) with open(lock_file, 'wb') as df: df.write(str(time.time() - 50)) clear(self.location, 10) self.assertEqual([], os.listdir(self.location))
def test_clear_location_with_exception(self): path_fo = os.path.join(self.location, '1_left.lock') lock_file = os.path.join(path_fo, 'lock') os.makedirs(path_fo) with open(lock_file, 'wb') as df: df.write('sfsdf') clear(self.location, 10) self.assertEqual(['1_left.lock'], os.listdir(self.location))
import cleaner _file = 'log.txt' try: open_file = open(_file, 'x') except IOError: print('El archivo no esta disponible') cleaner.clear() print(""" """)
def test_clear_location_no_lock(self): clear(self.location, 5) self.assertEqual([], os.listdir(self.location))