From f5d8347134ee0560a3b304969d3cd02003a81bfa Mon Sep 17 00:00:00 2001 From: Don Garrett Date: Tue, 23 May 2023 13:31:56 -0500 Subject: [PATCH] Create minimal test for dictionary before HDF5 rewrite. --- dictionary.py | 7 +++---- test_dictionary.py | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 test_dictionary.py diff --git a/dictionary.py b/dictionary.py index 5327077..b557ddc 100644 --- a/dictionary.py +++ b/dictionary.py @@ -1,12 +1,8 @@ #!/usr/bin/python - WORDLE_LENGTH = 5 -_wordle_dictionary = set() - - _invalid_words = set( [ "amala", @@ -67,6 +63,9 @@ _invalid_words = set( ) +_wordle_dictionary = set() + + def words(): if not _wordle_dictionary: with open("words_alpha.txt") as word_file: diff --git a/test_dictionary.py b/test_dictionary.py new file mode 100644 index 0000000..b781c4e --- /dev/null +++ b/test_dictionary.py @@ -0,0 +1,14 @@ +#!/usr/bin/python + +import unittest + +import dictionary + + +class TestDictionary(unittest.TestCase): + def test_empty(self): + words = dictionary.words() + + +if __name__ == "__main__": + unittest.main()