Tests for CS540 Spring 2021 HW4: Clustering
- make float support optional (still needs to remove NaN/inf)
- clarify error messages
- test more than 20 points
- check for latest version
- allow for either
np.matrixornp.arrayreturn value fromhac - add test to see if
hacfilters out invalid points
Download test.py, Random_Test.csv, and Tiebreak_Test.csv and move them into the directory that contains pokemon_stats.py and Pokemon.csv
The contents of your directory should look like this:
$ tree
.
├── pokemon_stats.py
├── Pokemon.csv
├── test.py
├── Random_Test.csv
└── Tiebreak_Test.csvTo run the tests, do
$ python3 test.pyIdeally, you should be running test.py using your terminal as this README describes. If you have an issue, first try running it that way. However, provided that test.py, pokemon_stats.py, and the 3 csvs are all in the same directory, it should work if you do %run test.py in Jupyter, or run it the same way you would run pokemon_stats.py in your editor (VS Code, Pycharm, Sublime, etc).
These tests do not check for imshow_hac. They only test load_data, calculate_x_y, hac, and random_x_y
These tests are not endorsed or created by anyone working in an official capacity with UW Madison or any staff for CS540. The tests are make by students, for students.
By running test.py, you are executing code you downloaded from the internet. Back up your files and take a look at what you are running first.
If you have comments or questions, create an issue at https://github.com/CS540-testers-SP21/hw3-tester/issues or ask in our discord at https://discord.gg/RDFNsAxgCQ.