# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['pvcheck']

package_data = \
{'': ['*']}

entry_points = \
{'console_scripts': ['pvcheck = pvcheck.main:main']}

setup_kwargs = {
    'name': 'pvcheck',
    'version': '0.1.6',
    'description': 'Perform automatic tests of the output produced by command line programs',
    'long_description': 'pvcheck\n=======\n\npvcheck is a tool that automates the testing of computer programs by checking the textual output of the program under testing with a set of user-defined test cases.\n\npvcheck has been developed to be used as automatic correction tool in the courses of Principles of Computer Programming at the University of Pavia.\n\nRequirements\n-------------\n\npvcheck requires a Python interpreter and can be executed as a standalone application.\nThe current version has been tested with Python 3.4.3.\n\nInstallation\n------------\n\nTo install pvcheck:\n\n```\npip install pvcheck\n```\n\nTo compile all the sample programs:\n\n```\ncd examples\nmake\n```\n\nUsage\n-----\n\npvcheck has 3 main arguments ([run](#run), [info](#info) and [export](#export)) .\n\n### help ###\n\nTo see the main help:\n\n```\npvcheck -h\n```\n\nor \n\n```\npvcheck --help\n```\n\nTo see the help of a specific command:\n\n```\npvcheck argument -h\n```\n\nor\n\n```\npvcheck argument --help\n```\n\n### the <a name="run"></a>run argument ###\n\nThe run argument, being the default argument, also works without explicit invocation. So\n\n```\npvcheck run ./program\n```\n\nis the same as:\n\n```\npvcheck ./program\n```\n\n#### test a program with a default test file ####\n\nIf you have a [test file](#testfile) with the default name *pvcheck.test* located in the pvcheck folder, you can test your program simply by using:\n\n```\npvcheck ./program\n```\n\n#### test a program with any test file ####\n\nIf you want to test a program using a specific [test file](#testfile):\n\n```\npvcheck -f testfile ./program\n```\n```\npvcheck --file testfile ./program\n```\n\n#### test a program with a specific test of a test suite ####\n\nIf you want to test a program using a specific test contained in a test suite, you can use the [info argument](#info) to list all the available tests. Then you can use:\n\n```\npvcheck -T testnumber ./program\n``` \n```\npvcheck --test testnumber ./program\n``` \n\nto use only the desired test.\n\n#### select a different output format ####\n\npvcheck lets you choose the output format. The formats available are [json](https://github.com/claudio-unipv/pvcheck/wiki/JSON-data-format), csv and html. To choose the ouput format:\n\n```\npvcheck -F format ./program\n``` \n```\npvcheck --format format ./program\n``` \n\n#### change timeout ####\n\nYou can set how many seconds it should be waited for the termination of the program:\n\n```\npvcheck -t timeout ./program\n```\n```\npvcheck --timeout timeout ./program\n``` \n\nThe default is 10 seconds.\n\n#### change the number of reported errors #####\n\nTo report up to N errors per section:\n\n```\npvcheck -e N ./program\n``` \n```\npvcheck --errors N ./program\n``` \n\nThe default is 4.\n\n#### set the verbosity level ####\n\nTo set the verbosity level, where the level must be an integer between 0 (minimum) and 4 (maximum):\n\n```\npvcheck -v verbositylevel ./program\n``` \n```\npvcheck --verbosity verbositylevel ./program\n``` \n\nThe default is 3.\n\n#### use valgrind ####\n\nTo use Valgrind (if installed) to check memory usage:\n\n```\npvcheck -V ./program\n``` \n```\npvcheck --valgrind ./program\n``` \n\n#### use a log file ####\n\nTo specify the name of the file used for logging:\n\n```\npvcheck -l logfile ./program\n``` \n```\npvcheck --log logfile ./program\n``` \n\nThe default is ~/.pvcheck.log.\n\n#### set an output limit ####\n\nTo cut the output of the program to a maximum of L lines:\n\n```\npvcheck -L L ./program\n``` \n```\npvcheck --output_limit L ./program\n```\n\nThe default is 10000.\n\n#### use a configuration file ####\n\nTo use the specified configuration file:\n\n\n```\npvcheck -c configurationfile ./program\n``` \n```\npvcheck --config configurationfile ./program\n``` \n\n#### change output color setting ####\n\nTo enable or disable colored output:\n\n```\npvcheck -C option ./program\n```\n```\npvcheck --color option ./program\n```\n\nThe options available are *YES*, *NO* and *AUTO*. The default value is *AUTO*.\n\n### the <a name="info"></a>info argument ###\n\nThe info argument lists all the available tests in a test file. \n\nTo see all the tests available in a test file:\n\n```\npvcheck info testfile\n``` \n\n### the <a name="export"></a>export argument ###\n\nThe export argument allows you to export in a file the input arguments from the selected test.\n\nTo export the input argument from a test, you can use the [info argument](#info) to list all the available tests. Then you can use:\n\n```\npvcheck export testnumber testfile\n``` \n\nThe output file is saved into the current directory with the name testname.dat .\n\nTest File<a name="testfile"></a>\n---------\n\n### description ###\n\nA test file is a file which contains one or more test cases.\n\nTests are divided in sections with names between square brackets.\n\nEmpty lines, and lines starting with \'#\' are ignored.\n\nNon-empty lines are compared against those produced by the program in the corresponding section.\n\nThe format of test definition files is rather simple.\nThe following examples include comments to concisely describe the various aspects of the format:\n\n* [single test case](https://github.com/claudio-unipv/pvcheck/blob/master/examples/example.test) \n* [multiple test cases](https://github.com/claudio-unipv/pvcheck/blob/master/examples/example2.test)\n* [multiple output lines](https://github.com/claudio-unipv/pvcheck/blob/master/examples/example3.test)\n* [temporary files](https://github.com/claudio-unipv/pvcheck/blob/master/examples/example4.test)\n\n### special sections ###\n\n#### the special section [.SECTIONS] ####\n\nThe special section [.SECTIONS] allows to specify additional options for the sections.\nOptions are usually declared at the beginning of the test file, or in a separate configuration file.\n\nFor example:\n\n```\n...\n\n[SECTION1]\n...\n\n[.SECTIONS]\nSECTION2 unordered\n\n[SECTION2]\n...\n``` \nindicates that the order of the lines in the SECTION2 section is not relevant.\n\n#### the special section [.TEST] ####\n\nIn case of multiple tests, each test is introduced by the special section [.TEST] followed by the name of the test.\n\nExample:\n\n```\n...\n\n[.TEST]\nTest1\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n\n[.TEST]\nTest2\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n``` \n\nCommon parts among all the test cases (for instance options in the [.SECTIONS] special section) can be specified before the first [.TEST] section. They will be prepended to all the tests.\n\n#### the special section [.INPUT] ####\n\nThe special section [.INPUT] allows to specify the text to be written on the program\'s standard input:\n\nExample:\n\n```\n...\n\n[.TEST]\nName of the test\n\n[.INPUT]\ninput1\ninput2\n...\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n\n[.TEST]\nThi is another test\n\n[.INPUT]\ninput3\ninput4\n...\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n``` \n\n#### the special section [.ARGS] ####\n\nThe special section [.ARGS] allows to specify additional arguments to be passed on the command line, one extra argument per line.\n\nExample:\n\n```\n...\n\n[.TEST]\nTest1\n\n[.ARGS]\narg1\narg2\n...\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n\n[.TEST]\nTest2\n\n[.ARGS]\narg3\narg4\n...\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n``` \n\n#### the special section [.FILE] ####\n\nThe special section [.FILE] shall be used together with the special section [.ARGS].\nWhen the special argument ".FILE" is present in the [.ARGS] section, a temporary file is automatically generated and filled with the content of the text in the [.FILE] section.\nThe name of the temporary file is passed on the command line of the program under test.\n\nExample:\n\n```\n...\n\n[.ARGS]\n.FILE\n...\n\n[.TEST]\nTest1\n\n[.FILE]\nfirst line written in the temporary file used for Test1\nsecond line written in the temporary file used for Test1\n...\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n\n[.TEST]\nTest2\n\n[.FILE]\nfirst line written in the temporary file used for Test2\nsecond line written in the temporary file used for Test2\n...\n\n[SECTION1]\n...\n\n[SECTION2]\n...\n``` \n\nWiki\n----\n\nFor more information, please visit the [wiki](https://github.com/claudio-unipv/pvcheck/wiki) of the project.\n\n',
    'author': 'Claudio Cusano',
    'author_email': 'claudio.cusano@unipv.it',
    'maintainer': 'Claudio Cusano',
    'maintainer_email': 'claudio.cusano@unipv.it',
    'url': None,
    'packages': packages,
    'package_data': package_data,
    'entry_points': entry_points,
    'python_requires': '>=3.8,<4.0',
}


setup(**setup_kwargs)
