mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
67 lines
24 KiB
Python
67 lines
24 KiB
Python
import unittest
|
|
import os
|
|
from gradio import inputs
|
|
|
|
BASE64_IMG = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wgARCADIAMgDASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABQACAwQGBwEI/8QAGgEAAwEBAQEAAAAAAAAAAAAAAQIDBAAFBv/aAAwDAQACEAMQAAAB09a1OqDQ98RNiD50j1JoWICkgVvMXUcqCNvqPJeNIQ++Pr0KuXmGfJPfPrQvUA6AQpUg3Y6OqBCz2SJZ7N5Zm+SPp0Escx6s70WQRK41/dsKw2yVmDkAUiVmgur0womMbrYuzSqrUxSYuMvBGByxWsSerPHXBJz0n2aZ9bZMc8C3cKvk3alA87zHa8Y84KNW2JzFKJlKV/S8LvkZSYpc70xBb1K88NddNM7i2kEpht+eWSLVZsMlNmsWaSpmvjLxGiHz01bl10e/Tl6IaFl3kUC2IVtWyW9wCJOqyAukhJrPR7/GHrftey1JfYIqcsz0gOpyxw2wPzIwXeDOpcwoxEUd7Rn6cWpvpH2KKdNA/Nkxxz2kLStNpc5pM95JLUnAfa8usaflqiwJ5keBTT0Gnnx3NptDzyUd0jOvyQnZNS31sUhtxb/JF21YlTMiSNEKKU6cm9KF0OTVIvYxK3XdHZYxRd3NjrwXRi5qvk5zRwq1kk4uOD6V82vkgs5wfhmh9LNWkjizPmXtuHqCDKnbsyNI47vv86o7cvSPMdRou0pi6C9eEKston5CGdjQuMv3P2Lz03yZPG622LXVq3tx6+KWfZWdliNMYrCr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/ehA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdAMIXfQYQPwQCEkD4AiadkCEQnQDCF30GED8EAhJA+AImnZAhEJ0Awhd9BhA/BAISQPgCJp2QIRCdwP8DoTrjXYqLRzoAAAAASUVORK5CYII="
|
|
RAND_STRING = "2wBDAAYEBQYFBAYGBQYHBwYIC"
|
|
PACKAGE_NAME = 'gradio'
|
|
|
|
|
|
class TestSketchpad(unittest.TestCase):
|
|
def test_path_exists(self):
|
|
inp = inputs.Sketchpad()
|
|
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.__class__.__name__.lower())
|
|
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
|
|
|
def test_preprocessing(self):
|
|
inp = inputs.Sketchpad()
|
|
array = inp.preprocess(BASE64_SKETCH)
|
|
self.assertEqual(array.shape, (1, 28, 28))
|
|
|
|
|
|
class TestWebcam(unittest.TestCase):
|
|
def test_path_exists(self):
|
|
inp = inputs.Webcam()
|
|
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.__class__.__name__.lower())
|
|
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
|
|
|
def test_preprocessing(self):
|
|
inp = inputs.Webcam()
|
|
array = inp.preprocess(BASE64_IMG)
|
|
self.assertEqual(array.shape, (224, 224, 3))
|
|
|
|
|
|
class TestTextbox(unittest.TestCase):
|
|
def test_path_exists(self):
|
|
inp = inputs.Textbox()
|
|
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(
|
|
inp.__class__.__name__.lower())
|
|
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
|
|
|
def test_preprocessing(self):
|
|
inp = inputs.Textbox()
|
|
string = inp.preprocess(RAND_STRING)
|
|
self.assertEqual(string, RAND_STRING)
|
|
|
|
|
|
class TestImageUpload(unittest.TestCase):
|
|
def test_path_exists(self):
|
|
inp = inputs.Image()
|
|
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.__class__.__name__.lower())
|
|
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
|
|
|
def test_preprocessing(self):
|
|
inp = inputs.Image()
|
|
array = inp.preprocess(BASE64_IMG)
|
|
self.assertEqual(array.shape, (224, 224, 3))
|
|
|
|
def test_preprocessing(self):
|
|
inp = inputs.Image()
|
|
inp.image_height = 48
|
|
inp.image_width = 48
|
|
array = inp.preprocess(BASE64_IMG)
|
|
self.assertEqual(array.shape, (48, 48, 3))
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main() |