from typer.testing import CliRunner

import os

from timerdo.main import app, sqlite_file_name
from timerdo.tables import ToDo, Timer
from sqlmodel import create_engine, Session, select
from datetime import datetime, timedelta

try:
    os.rename('/home/cmts/.config/timerdo/timerdo_db.db',
              '/home/cmts/.config/timerdo/timerdo_db_moved.db')
except FileNotFoundError:
    pass


sqlite_url = f'sqlite:///{sqlite_file_name}'

engine = 