{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Education", "License :: Freeware", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Education", "Topic :: Software Development", "Topic :: Software Development :: Testing" ], "description": "vpltest\r\n=======\r\n\r\nBackground\r\n----------\r\nVPL (http://vpl.dis.ulpgc.es/) allows customizing evaluation process with custom execution files. This can be used for testing students' submissions with professional testing frameworks. ``vpltest`` makes this easier for Python assignments by translating output from `nose `_ or `pytest `_ to the format required by VPL. \r\n\r\n.. note::\r\n\r\n You may want to use ``vpltest`` together with `edutest `_.\r\n\r\nBasic usage\r\n-----------\r\n1. Write normal `unittest `_, `nose `_ or `pytest `_ tests without worrying about VPL.\r\n2. Test your tests without worrying about VPL. \r\n3. Create a VPL activity and upload your test files under *Advanced settings => Execution files*.\r\n4. Upload also *vpltest.py*\r\n5. To *vpl_execution.sh* write following lines:\r\n\r\n\r\n.. sourcecode:: bash\r\n \r\n #!/bin/bash\r\n python3 vpltest.py\r\n\r\n\r\nReplace ``python3`` with ``python`` if you're using Python 2.\r\n\r\n\r\nCommand line arguments\r\n----------------------\r\nYou can tweak ``vpltest`` with following command line arguments:\r\n\r\n* ``--nose`` and ``--pytest`` select the framework for collecting and running the tests. If neither flag is present, ``vpltest`` uses the one which happens to be installed. It prefers nose if both are installed;\r\n* ``--show-grade`` makes ``vpltest`` propose a grade based on how big part of the tests passed;\r\n* ``--show-stacktrace`` includes stacktraces in the reports;\r\n* ``--allow-deletion`` (see \"Automatically keeping all execution files available\");\r\n* all other arguments are passed on to the testing framework.\r\n\r\nExample. If you want ``vpltest`` to compute the grade, run your tests with pytest and make pytest run also doctests, then your *vpl_evaluation.sh* should be \r\n\r\n.. sourcecode:: bash\r\n \r\n #!/bin/bash\r\n python3 vpltest.py --show-grade --pytest --doctest-modules\r\n\r\n\r\n\r\nTest discovery\r\n--------------\r\nBy default all execution files matching *\\*test\\*.py* (except *vpltest.py*) are considered to be test files and are passed on to testing framework. You can override this by specifying test files in *vpl_evaluation.sh*, eg:\r\n\r\n.. sourcecode:: bash\r\n \r\n #!/bin/bash\r\n python3 vpltest.py --show-grade --pytest basic_tests.py style_checks.py\r\n\r\n\r\n\r\nTest discovery inside the modules are up to chosen framework.\r\n\r\nInstalling to server\r\n--------------------\r\nIf you use ``vpltest`` a lot, then it makes sense to install it into your testing server so that you don't need to upload it every time. It can be installed with ``pip``, eg. ``sudo pip3 install pytest``.\r\n\r\nNote that now ``python3 vpltest.py`` in your *vpl_execution.sh* won't do as there won't be *vpltest.py* in testing directory anymore. Use ``python3 -m vpltest`` instead.\r\n\r\nAutomatically creating *vpl_execution*\r\n--------------------------------------\r\nVPL is designed so that *vpl_execution.sh* is not meant for running the tests but for executing the compilation phase, which includes preparing *vpl_execution*, which will be used to run the tests. This design makes sense with compiled languages, but with Python the compilation phase is just a nuisance. ``vpltest`` tries to make its usage experience smoother, by taking care of creating *vpl_execution* if necessary. That's why you need to write only 2 lines into *vpl_execution.sh*.\r\n\r\nAutomatically keeping all execution files available\r\n---------------------------------------------------\r\nAfter compilation phase, VPL by default deletes all original execution files, unless you tick them under *Advanced settings => Files to keep when running*.\r\n\r\n``vpltest`` needs original test files to be present when running, but you don't need remember it, because it uses a trick which makes originals always available. If you don't like this, then run it with ``--allow-deletion``.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/plas/vpltest", "keywords": "pytest nose VPL", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "vpltest", "package_url": "https://pypi.org/project/vpltest/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/vpltest/", "project_urls": { "Homepage": "https://bitbucket.org/plas/vpltest" }, "release_url": "https://pypi.org/project/vpltest/0.6/", "requires_dist": null, "requires_python": "", "summary": "Allows running Python tests (unittest, nose, pytest) in the context of VPL Moodle plugin (http://vpl.dis.ulpgc.es/)", "version": "0.6" }, "last_serial": 1929305, "releases": { "0.4": [ { "comment_text": "", "digests": { "md5": "1384af218ae089b13eb9c5733be7972a", "sha256": "7a08cf56c6c8fcdcea83f83b529cce60caae93481d702142d243f4c408236073" }, "downloads": -1, "filename": "vpltest-0.4.zip", "has_sig": false, "md5_digest": "1384af218ae089b13eb9c5733be7972a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6888, "upload_time": "2015-12-04T16:38:46", "url": "https://files.pythonhosted.org/packages/5b/e2/c392892a7435a90e0bf47d48d0bc859a7dbb2a96ec306256b3bee84af9be/vpltest-0.4.zip" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "46472dcb102295e0a5f00a031d330a41", "sha256": "89e95fb4f4eaf7d478db791834d0c1aa656401bb33f7574f06ab76c31110b60b" }, "downloads": -1, "filename": "vpltest-0.5.zip", "has_sig": false, "md5_digest": "46472dcb102295e0a5f00a031d330a41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7145, "upload_time": "2016-01-29T12:13:55", "url": "https://files.pythonhosted.org/packages/8e/20/d8816c1c413ce22700941c8942a0b75cecc4e6d0c39f2a37eb998f173070/vpltest-0.5.zip" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "f77ea65129fb419b1d08e6c612e12033", "sha256": "2c7bd09f57b19ce47a4f986bdd64af10888c59d62ebd297833f4bf298ac3ecbd" }, "downloads": -1, "filename": "vpltest-0.6.zip", "has_sig": false, "md5_digest": "f77ea65129fb419b1d08e6c612e12033", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7128, "upload_time": "2016-01-29T13:26:37", "url": "https://files.pythonhosted.org/packages/17/c0/c8a501169037e278cdd7b10784ffeb82bab9c931e6ec9950ea719c300c2f/vpltest-0.6.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f77ea65129fb419b1d08e6c612e12033", "sha256": "2c7bd09f57b19ce47a4f986bdd64af10888c59d62ebd297833f4bf298ac3ecbd" }, "downloads": -1, "filename": "vpltest-0.6.zip", "has_sig": false, "md5_digest": "f77ea65129fb419b1d08e6c612e12033", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7128, "upload_time": "2016-01-29T13:26:37", "url": "https://files.pythonhosted.org/packages/17/c0/c8a501169037e278cdd7b10784ffeb82bab9c931e6ec9950ea719c300c2f/vpltest-0.6.zip" } ] }