mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-13 11:57:29 +08:00
test fixes
This commit is contained in:
parent
b423badb71
commit
9ea3686404
@ -11,7 +11,7 @@ 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__)
|
||||
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):
|
||||
@ -23,7 +23,7 @@ class TestSketchpad(unittest.TestCase):
|
||||
class TestWebcam(unittest.TestCase):
|
||||
def test_path_exists(self):
|
||||
inp = inputs.Webcam()
|
||||
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.__class__.__name__)
|
||||
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):
|
||||
@ -35,7 +35,8 @@ class TestWebcam(unittest.TestCase):
|
||||
class TestTextbox(unittest.TestCase):
|
||||
def test_path_exists(self):
|
||||
inp = inputs.Textbox()
|
||||
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.__class__.__name__)
|
||||
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):
|
||||
@ -47,7 +48,7 @@ class TestTextbox(unittest.TestCase):
|
||||
class TestImageUpload(unittest.TestCase):
|
||||
def test_path_exists(self):
|
||||
inp = inputs.Image()
|
||||
path = inputs.BASE_INPUT_INTERFACE_JS_PATH.format(inp.__class__.__name__)
|
||||
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):
|
||||
|
@ -11,7 +11,7 @@ BASE64_IMG = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAY
|
||||
class TestLabel(unittest.TestCase):
|
||||
def test_path_exists(self):
|
||||
out = outputs.Label()
|
||||
path = outputs.BASE_OUTPUT_INTERFACE_JS_PATH.format(out.__class__.__name__)
|
||||
path = outputs.BASE_OUTPUT_INTERFACE_JS_PATH.format(out.__class__.__name__.lower())
|
||||
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
||||
|
||||
# def test_postprocessing_string(self):
|
||||
@ -50,7 +50,7 @@ class TestLabel(unittest.TestCase):
|
||||
class TestTextbox(unittest.TestCase):
|
||||
def test_path_exists(self):
|
||||
out = outputs.Textbox()
|
||||
path = outputs.BASE_OUTPUT_INTERFACE_JS_PATH.format(out.__class__.__name__)
|
||||
path = outputs.BASE_OUTPUT_INTERFACE_JS_PATH.format(out.__class__.__name__.lower())
|
||||
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
||||
|
||||
def test_postprocessing(self):
|
||||
@ -63,7 +63,7 @@ class TestTextbox(unittest.TestCase):
|
||||
class TestImage(unittest.TestCase):
|
||||
def test_path_exists(self):
|
||||
out = outputs.Image()
|
||||
path = outputs.BASE_OUTPUT_INTERFACE_JS_PATH.format(out.__class__.__qualname__)
|
||||
path = outputs.BASE_OUTPUT_INTERFACE_JS_PATH.format(out.__class__.__qualname__.lower())
|
||||
self.assertTrue(os.path.exists(os.path.join(PACKAGE_NAME, path)))
|
||||
|
||||
def test_postprocessing(self):
|
||||
|
Loading…
Reference in New Issue
Block a user