tests best practices

This commit is contained in:
Ace
2023-11-21 15:18:19 +01:00
parent 96a972e31f
commit 59c59e80f5
18 changed files with 177 additions and 304 deletions

View File

@@ -83,12 +83,11 @@ class Inkyimage:
@staticmethod
def preview(image):
""""Previews an image on gpicview (only works on Rapsbian with Desktop).
"""
path = '/home/pi/Desktop/'
image.save(path + 'temp.png')
os.system("gpicview " + path + 'temp.png')
os.system('rm ' + path + 'temp.png')
"""Previews an image on gpicview (only works on Rapsbian with Desktop)."""
path = '~/temp'
image.save(path + '/temp.png')
os.system("gpicview " + path + '/temp.png')
os.system('rm ' + path + '/temp.png')
def _image_loaded(self):
"""returns True if image was loaded"""