Skip to content

Commit

Permalink
Boolean algebra pytests (#1097)
Browse files Browse the repository at this point in the history
* Added Zeller's congruence algorithm

* Update args help

* add a few doctests

* remove old file
  • Loading branch information
mrvnmchm authored and cclauss committed Aug 5, 2019
1 parent bdbe682 commit 87a789a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions boolean_algebra/quine_mc_cluskey.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
"""
doctests
>>> decimal_to_binary(3,[1.5])
['0.00.01.5']
>>> check(['0.00.01.5'])
['0.00.01.5']
>>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5'])
[[1]]
>>> selection([[1]],['0.00.01.5'])
['0.00.01.5']
"""
def compare_string(string1, string2):
l1 = list(string1); l2 = list(string2)
count = 0
Expand Down Expand Up @@ -113,4 +128,6 @@ def main():
print(essential_prime_implicants)

if __name__ == '__main__':
import doctest
doctest.testmod()
main()

0 comments on commit 87a789a

Please sign in to comment.