solves issue #371

1. deprecated assertEquals is changed to assertEqual.
2. Files that are opened using the load function are closed.