Skip to content
Permalink
Browse files
Added some tests for the hash function
  • Loading branch information
James Shuttleworth committed Oct 1, 2021
1 parent 1b36ce1 commit 2556aee868d6fdc5191dc0fb75dd2b0a49d71e08
Showing with 3 additions and 3 deletions.
  1. +3 −1 Makefile
  2. +0 −2 tests/test_solution.py
@@ -33,7 +33,9 @@ docs: FORCE message venvcheck


message: FORCE
@echo "\n${RED}If you don't have pytest or pdoc3 installed, you will need to install them globally or inside a virtualenv. This Makefile can build the venv for you, if you use '${YELLOW}make venv${RED}' followed by '${YELLOW}. ./${VENV}/bin/activate${RED}' and finally '${YELLOW}make prereqs${RED}'${RESET}\n"
@echo
@echo "${RED}If you don't have pytest or pdoc3 installed, you will need to install them globally or inside a virtualenv. This Makefile can build the venv for you, if you use '${YELLOW}make venv${RED}' followed by '${YELLOW}. ./${VENV}/bin/activate${RED}' and finally '${YELLOW}make prereqs${RED}'${RESET}"
@echo


venv: FORCE
@@ -4,8 +4,6 @@ sys.path.append("./src/")
import rainbow_generator
import pearson

flag="MzZwcx15NHQzOnxzcnI9cjk="


def test_generator():
d=rainbow_generator.generateTable(["test1", "test2", "test3"], lambda x: pearson.hashN(x,2), rainbow_generator.makeGuess, 20, 3, 6, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')

0 comments on commit 2556aee

Please sign in to comment.