#!@PYTHON_EXECUTABLE@
#ckwg +5
# Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
# KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
# Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.


def test_import():
    try:
        import vistk.pipeline_util.bake
    except:
        test_error("Failed to import the bake module")


def test_api_calls(path):
    from vistk.scoring import scoring_result

    result = scoring_result.ScoringResult(1, 1, 1)

    result.hit_count
    result.miss_count
    result.truth_count
    result.percent_detection()
    result.precision()

    result + result


def main(testname):
    if testname == 'import':
        test_import()
    elif testname == 'api_calls':
        test_api_calls()
    else:
        test_error("No such test '%s'" % testname)


if __name__ == '__main__':
    import os
    import sys

    if not len(sys.argv) == 5:
        test_error("Expected four arguments")
        sys.exit(1)

    testname = sys.argv[1]

    os.chdir(sys.argv[2])

    sys.path.append(sys.argv[3])

    from vistk.test.test import *

    try:
        main(testname)
    except BaseException as e:
        test_error("Unexpected exception: %s" % str(e))

@@ -917,17 +917,17 @@
 rgv) == 
-5
+4
 :%0A      
@@ -953,12 +953,13 @@
 ted 
-four
+three
  arg

Fix the expected argument check in scoring tests