Skip to content
Permalink
Browse files
Added quick test for working solution
  • Loading branch information
James Shuttleworth committed Oct 1, 2021
1 parent 5a1f3bb commit 1b36ce17a1fab89a8aa142014b14b3d51fe2e315
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
@@ -4,3 +4,4 @@
/src/answer.py
/html/
/submission/5062CEM_2021_22_SepJan_CW1_main_sit_0123456789.html
/tests/__pycache__/
@@ -1,4 +1,4 @@
simple-term-menu
pdoc3
markdown

pytest
@@ -0,0 +1,13 @@
import pytest
import sys
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')

assert d=={b'fa': 'test1', b'=\xcd': 'test2', b'\x0b\n': 'test3'}

0 comments on commit 1b36ce1

Please sign in to comment.