diff ppgen.py @ 2:a099246680ae

Fix for the unique test. This was working in simple tests before. Thanks for Sascha L. Teichmann for detailed reporting.
author Bernhard Reiter <bernhard@intevation.de>
date Mon, 02 May 2016 09:23:18 +0200
parents 00ed7df30fe4
children 757625ec8364
line wrap: on
line diff
--- a/ppgen.py	Mon Feb 22 16:14:24 2016 +0100
+++ b/ppgen.py	Mon May 02 09:23:18 2016 +0200
@@ -40,6 +40,8 @@
 
     # dictionary for testing
     #d = ["abc", "aBc", "cde", "efg", "hij", "blubber", "jikf", "zug", "lmf", "opq"]
+    # second test dictionary to show that different string functions are used.
+    #d =  [''.join('A' * 1000) for _ in range(1000)]
 
     # Using the dictionary from Ding **customize**
     d = readDingDict(filename="/usr/share/trans/de-en", useLeft=True)
@@ -122,7 +124,7 @@
     words = {}
     for x in range(howMany):
         word = _srandom.choice(dictionary)
-        words[word.lower]= True
+        words[word.lower()]= True
         print(word, end='\n    ')
     print("\n")
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)