From b45946a10822f85f5777c0267b7957bef5892536 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Tue, 26 Nov 2019 17:21:50 +0000 Subject: [PATCH] Issue #1: Update to fix dummy unit tests. --- labelboxutils/ui/labelbox_export_json_app.py | 1 - tests/pylintrc | 2 +- tests/test_labelbox_json_export.py | 12 +++++++++ tests/test_labelboxutils.py | 27 -------------------- 4 files changed, 13 insertions(+), 29 deletions(-) create mode 100644 tests/test_labelbox_json_export.py delete mode 100644 tests/test_labelboxutils.py diff --git a/labelboxutils/ui/labelbox_export_json_app.py b/labelboxutils/ui/labelbox_export_json_app.py index 9e84da2..acb1dce 100644 --- a/labelboxutils/ui/labelbox_export_json_app.py +++ b/labelboxutils/ui/labelbox_export_json_app.py @@ -61,4 +61,3 @@ def run_labelbox_json_export(json_file, output_dir, output_format): + '_' + value + '.png') cv2.imwrite(file_name, rgb) six.print_("writing to:" + file_name) - diff --git a/tests/pylintrc b/tests/pylintrc index 3ced4ef..4c687f1 100644 --- a/tests/pylintrc +++ b/tests/pylintrc @@ -32,7 +32,7 @@ unsafe-load-any-extension=no # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code -extension-pkg-whitelist=numpy +extension-pkg-whitelist=numpy, cv2 # Allow optimization of some AST trees. This will activate a peephole AST # optimizer, which will apply various small optimizations. For instance, it can diff --git a/tests/test_labelbox_json_export.py b/tests/test_labelbox_json_export.py new file mode 100644 index 0000000..28aeb50 --- /dev/null +++ b/tests/test_labelbox_json_export.py @@ -0,0 +1,12 @@ +# coding=utf-8 + +""" labelbox_export_json unit tests. """ + +from labelboxutils.ui.labelbox_export_json_app import run_labelbox_json_export +import six + +# Pytest style + + +def test_labelbox_export_json(): + assert True # Placeholder. diff --git a/tests/test_labelboxutils.py b/tests/test_labelboxutils.py deleted file mode 100644 index 747eb1c..0000000 --- a/tests/test_labelboxutils.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 - -"""Labelbox Utils tests""" - -from labelboxutils.ui.labelboxutils_demo import run_demo -from labelboxutils.algorithms import addition, multiplication -import six - -# Pytest style - -def test_using_pytest_labelboxutils(): - x = 1 - y = 2 - verbose = False - multiply = False - - expected_answer = 3 - assert run_demo(x, y, multiply, verbose) == expected_answer - -def test_addition(): - - assert addition.add_two_numbers(1, 2) == 3 - -def test_multiplication(): - - assert multiplication.multiply_two_numbers(2, 2) == 4 - -- GitLab