Skip to content
Permalink
Browse files
Added commented-out tests for the asASCII function
  • Loading branch information
digehode committed Jul 17, 2020
1 parent 81f2859 commit fad72a4382b1894c5b378482505ce5cb953915b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
@@ -1,6 +1,9 @@
#!python
""" Software and functions to convert from arbitrary strings to various representations of the individual characters """
import colored

TODO: Docstrings

def asHex(data):
#Start with an empty string
output=""
@@ -8,6 +8,8 @@ import transcoder





def test_asHex():
""" Test the 'asHex' function """

@@ -47,3 +49,17 @@ def test_asBinary():
assert transcoder.asBinary(chr(255))=="0b11111111"
#Lowest byte value
assert transcoder.asBinary(chr(0))=="0b0"



# def test_asASCII():
# """ Test the 'asASCII' function """
#
# #First a simple string
# assert transcoder.asASCII("ABC")=="65 66 67"
# #An empty string
# assert transcoder.asASCII("")==""
# #The highest byte value
# assert transcoder.asASCII(chr(255))=="255"
# #Lowest byte value
# assert transcoder.asASCII(chr(0))=="0"

0 comments on commit fad72a4

Please sign in to comment.