Skip to content

ncf-ds/algorithms-project-01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Work for Fall 2015 'Algorithms for Data Science'

Unit Testing

test/sort_tester.py contains the SortTester class, which can be subclassed to test given sort implementations. It tries the implementation with lists of various lengths, in random, ascending, and descending order. It also includes a test for sort stability, which can be disabled (see below).

Subclasses need to define the sort method, which should take a list and sort it in place. If the sort to be tested is unstable, override the isStable method, to return False.

See test/test_sorted.py for an example using the built-in sorted function. Run it with:

./test/test_sorted.py

About

Work for project 01, ''Algorithms for Data Science", Fall 2015

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages