I don't really understand the point of auto_import or what it does exactly but it does *NOT* read the database. Per the book it reads the metadata in the .table files (which your code is deleting with os.remove(dbfolder+"/test.table")).
Maybe it's time to ask: what are you trying to do?

