Create unittest for gimp_passport.py.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 3 Jun 2019 21:22:12 +0000 (23:22 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 3 Jun 2019 21:22:12 +0000 (23:22 +0200)
test_gimp_passport.py [new file with mode: 0644]

diff --git a/test_gimp_passport.py b/test_gimp_passport.py
new file mode 100644 (file)
index 0000000..93487ce
--- /dev/null
@@ -0,0 +1,15 @@
+import os
+import unittest
+from gimp_passport import main
+
+
+class TestMakePassport(unittest.TestCase):
+
+    def test_main(self):
+        source = 'test_image.png'
+        dest = 'test_image_result.png'
+        if os.path.exists(dest):
+            os.remove(dest)
+        main(source, dest)
+        self.assertTrue(os.path.exists(dest))
+