fix unittest
This commit is contained in:
		| @@ -13,11 +13,11 @@ from tests import Config | |||||||
| preview = Inkyimage.preview | preview = Inkyimage.preview | ||||||
| merge = Inkyimage.merge | merge = Inkyimage.merge | ||||||
|  |  | ||||||
| temp_path = f"{Config.TEMP_PATH}/temp.txt" |  | ||||||
|  |  | ||||||
| logger = logging.getLogger(__name__) | logger = logging.getLogger(__name__) | ||||||
| logging.basicConfig(level=logging.DEBUG) | logging.basicConfig(level=logging.DEBUG) | ||||||
|  |  | ||||||
|  | temp_path = f"{Config.TEMP_PATH}/temp.txt" | ||||||
|  |  | ||||||
| dummy_data = [ | dummy_data = [ | ||||||
|     'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', ' Donec feugiat facilisis neque vel blandit.', |     'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', ' Donec feugiat facilisis neque vel blandit.', | ||||||
|     'Integer viverra dolor risus.', ' Etiam neque tellus, sollicitudin at nisi a, mollis ornare enim.', |     'Integer viverra dolor risus.', ' Etiam neque tellus, sollicitudin at nisi a, mollis ornare enim.', | ||||||
| @@ -88,7 +88,7 @@ class TestTextToDisplay(unittest.TestCase): | |||||||
|  |  | ||||||
|     def setUp(self): |     def setUp(self): | ||||||
|         self.temp_path = temp_path |         self.temp_path = temp_path | ||||||
|         if not os.path.exists(self.temp_path): |         if not os.path.exists(Config.TEMP_PATH): | ||||||
|             logger.info("could not find temporary file, creating now.") |             logger.info("could not find temporary file, creating now.") | ||||||
|             with open(self.temp_path, encoding="utf-8", mode="w") as file: |             with open(self.temp_path, encoding="utf-8", mode="w") as file: | ||||||
|                 file.writelines(dummy_data) |                 file.writelines(dummy_data) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user