test fixes

This commit is contained in:
dawoodkhan82 2020-07-01 20:34:51 -04:00
parent b423badb71
commit 9ea3686404
2 changed files with 8 additions and 7 deletions

View File

@ -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):

View File

@ -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):