mirror of
				https://github.com/KevinMidboe/knowit_julekalender-2018.git
				synced 2025-10-29 17:50:19 +00:00 
			
		
		
		
	Now returns our wanted format for the tests and uses a relative path when importing files.
This commit is contained in:
		@@ -3,10 +3,11 @@
 | 
				
			|||||||
# @Author: KevinMidboe
 | 
					# @Author: KevinMidboe
 | 
				
			||||||
# @Date:   2017-12-04 16:40:56
 | 
					# @Date:   2017-12-04 16:40:56
 | 
				
			||||||
# @Last Modified by:   KevinMidboe
 | 
					# @Last Modified by:   KevinMidboe
 | 
				
			||||||
# @Last Modified time: 2017-12-04 20:20:28
 | 
					# @Last Modified time: 2017-12-16 14:09:31
 | 
				
			||||||
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_wordlist():
 | 
					def get_wordlist():
 | 
				
			||||||
	with open('./ordliste.txt', 'r') as wordlist:
 | 
						with open(os.path.dirname(__file__) + '/ordliste.txt', 'r') as wordlist:
 | 
				
			||||||
		read_data = wordlist.read().splitlines()
 | 
							read_data = wordlist.read().splitlines()
 | 
				
			||||||
	wordlist.close()
 | 
						wordlist.close()
 | 
				
			||||||
	return read_data
 | 
						return read_data
 | 
				
			||||||
@@ -43,6 +44,7 @@ def main():
 | 
				
			|||||||
			matches.append(word)
 | 
								matches.append(word)
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
	print(matches, len(matches))
 | 
						print(matches, len(matches))
 | 
				
			||||||
 | 
						return len(matches)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
	main()
 | 
						main()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user