{ "info": { "author": "Adrian Sampson", "author_email": "asampson@cs.cornell.edu", "bugtrack_url": null, "classifiers": [], "description": "Tiny Unified Runner N' Tester (Turnt)\n=====================================\n\nTurnt is a simple testing tool inspired by [Cram][] and [LLVM's lit][lit].\nThe idea is that each test consists a single input file and one or more output files.\nYou want to run a command on the input file and check that the output is equal to the expected output files.\n\nTo use it:\n\n1. Create a test file.\n2. Decide what command you need to run on this input.\n There are two options:\n You can put this in a `turnt.toml` config file alongside your test: use `command = \"mycmd {filename}\"` to pass the test file as an argument to `mycmd`.\n Or you can embed it in a comment in the test file itself: use `CMD: mycmd {filename}`.\n3. Get the initial output.\n Run `turnt --save foo.t` to generate the expected output in `foo.out`.\n You'll want to check these output files into version control along with your test.\n4. Run the tests.\n Use `turnt foo.t` to check a test output.\n If a test fails, add `--diff` to compare the actual and expected outputs.\n\n[cram]: https://bitheap.org/cram/\n[lit]: https://llvm.org/docs/CommandGuide/lit.html\n\n\nInstall\n-------\n\nThis is a Python 3 tool.\nInstall it with [pip][]:\n\n $ pip install --user turnt\n\nOr, if you want to work on Turnt, you can install [Flit][], clone this repository, and type this to get a \"live\" installation with a symlink:\n\n $ flit install --symlink --user\n\n[pip]: https://pip.pypa.io/\n[flit]: https://flit.readthedocs.io/\n\n\nDetails\n-------\n\nThese options are available in `turnt.toml`:\n\n- `command`.\n This is a shell command to run for each test input.\n- `output`.\n This is a mapping from extensions to output files to collect from each test.\n For example, use `output.txt = \"my_output.txt\"` to collect `my_output.txt` after each text extension and save it in `.txt`.\n Use `-` to indicate the command's standard output and `2` to indicate its standard error.\n The default is like `output.out = \"-\"`, i.e., capture stdout and save it in `.out`.\n You can include this yourself or omit if if you want to ignore the standard output.\n- `return_code`.\n The expected exit status for the command. By default, 0.\n\nEquivalently, you can embed options in test files themselves:\n\n- `CMD: ` overrides `command` from the configuration.\n- `OUT: ` overrides `output` from the configuration.\n You can specify multiple files this way: one line per file.\n- `ARGS: `. Add arguments to a configured command (see below).\n- `RETURN: `. The expected exit status.\n\nIn commands and filenames, you can use certain patterns that get substituted with details about the tests:\n\n- `{filename}`: The name of the test file (without the directory part).\n- `{base}`: Just the basename of the test file (no extension).\n- `{args}`: Extra arguments specified using `ARGS:` in the test file.\n\nIf you need multiple files for a test, you can use a directory instead of a file.\nTurnt will not attempt to read embedded comment options from directories, and outputs will be placed *inside* the test directory instead of adjacent to it.\n\n\nCommand Line\n------------\n\nThese are the command-line options:\n\n- `--save`: Bless the current output from each test as the \"correct\" output, saving it to the output file that you'll want to check into version control.\n- `--diff`: Show diffs between the actual and expected output for each test.\n- `--verbose` or `-v`: Disable Turnt's default behavior where it will suppress test commands' stderr output. The result is more helpful but harder to read.\n- `--print` or `-p`: Instead of checking test results, just run the command and show the output directly. This can be useful (especially in combination with `-v`) when iterating on a test interactively.\n- `--args` or `-a`: Override the `args` string that gets interpolated into commands, which normally comes from in-file comments.\n\n\nTAP\n---\n\nTurnt outputs [TAP][] results by default.\nTo make the output more pleasant to read, you can pipe it into a tool like [tap-difflet][]:\n\n $ npm install -g tap-difflet\n $ turnt *.t | tap-difflet\n\n[tap]: http://testanything.org\n[tap-difflet]: https://github.com/namuol/tap-difflet\n\n\nAuthors\n-------\n\nTurnt is by [Adrian Sampson][adrian] and [Alexa VanHattum][alexa].\nWe made it to test various research compilers in [Capra][].\nThe license is [MIT][].\n\n[adrian]: https://www.cs.cornell.edu/~asampson/\n[alexa]: https://www.cs.cornell.edu/~avh/\n[capra]: https://capra.cs.cornell.edu\n[mit]: https://opensource.org/licenses/MIT\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cucapra/turnt", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "turnt", "package_url": "https://pypi.org/project/turnt/", "platform": "", "project_url": "https://pypi.org/project/turnt/", "project_urls": { "Homepage": "https://github.com/cucapra/turnt" }, "release_url": "https://pypi.org/project/turnt/1.2.0/", "requires_dist": [ "click", "tomlkit" ], "requires_python": ">=3.4", "summary": "Turnt is a simple expect-style testing tool for command-line", "version": "1.2.0" }, "last_serial": 5879343, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c7a8fbaed86567d49bd35254cc3b63b5", "sha256": "b1fd8a6bae490a32d4738b975cce54e15c3bda5e343ac1dc3479b59586a6e23b" }, "downloads": -1, "filename": "turnt-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c7a8fbaed86567d49bd35254cc3b63b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 11312, "upload_time": "2019-09-03T13:20:35", "url": "https://files.pythonhosted.org/packages/46/fa/4e5d94b48bfed3491afc92601b84ce13009242f0ab13c8268ac71261540e/turnt-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36fe397f81c87f8cbe54a9db4f53b3ae", "sha256": "5629b627291083b6254509a8052c59256b0d82eb09939a80da8189bfb388c76f" }, "downloads": -1, "filename": "turnt-1.0.0.tar.gz", "has_sig": false, "md5_digest": "36fe397f81c87f8cbe54a9db4f53b3ae", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6283, "upload_time": "2019-09-03T13:20:39", "url": "https://files.pythonhosted.org/packages/b8/ab/ac19875bac59867de051425e82c30bbbf2846f3da09c528bd5907221d9b4/turnt-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "6ac5301cd1253c6920edb9cd96ad127c", "sha256": "e15b94962aaddc1840190672a1ee274edd806635e0c8a3ea434947c078ceedba" }, "downloads": -1, "filename": "turnt-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6ac5301cd1253c6920edb9cd96ad127c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 12304, "upload_time": "2019-09-12T14:49:04", "url": "https://files.pythonhosted.org/packages/8a/27/57809ed36372ce509dbab870291d5475324ff0422100e8e08c6e5e37ba3e/turnt-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7028324b0cf421a37d3a87db10369be3", "sha256": "4ec24a556c6adcb2bdf07499a7af9c17f3e06e6ac7b374524d9e59422b3cbd4d" }, "downloads": -1, "filename": "turnt-1.1.0.tar.gz", "has_sig": false, "md5_digest": "7028324b0cf421a37d3a87db10369be3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 6853, "upload_time": "2019-09-12T14:49:08", "url": "https://files.pythonhosted.org/packages/1d/db/a85902767c6b074dd3ca133ca7782258aae36a6442a8c1d6eab3553cd373/turnt-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "4a1a1b89941264c2d925871892e1e5ae", "sha256": "d2376f9dec293baf4acc3264e46689ac438348e72593941e4b7f0d6f8ca06fc4" }, "downloads": -1, "filename": "turnt-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4a1a1b89941264c2d925871892e1e5ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 13456, "upload_time": "2019-09-24T12:11:01", "url": "https://files.pythonhosted.org/packages/82/f0/13feb096c6b02695be7282c69b705ea213b38f15a766edb56dae243c8bfe/turnt-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b2544711decf2da95bcee5b09d0e38d", "sha256": "e0cbfa938dd8add18105f0ac5a4ae91b44993e8c8a41b861634e235080877185" }, "downloads": -1, "filename": "turnt-1.2.0.tar.gz", "has_sig": false, "md5_digest": "6b2544711decf2da95bcee5b09d0e38d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 7499, "upload_time": "2019-09-24T12:11:02", "url": "https://files.pythonhosted.org/packages/0f/36/4310e571138d3a3f867591983c293da2980bab3148c27e38e1fa037e7be6/turnt-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a1a1b89941264c2d925871892e1e5ae", "sha256": "d2376f9dec293baf4acc3264e46689ac438348e72593941e4b7f0d6f8ca06fc4" }, "downloads": -1, "filename": "turnt-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4a1a1b89941264c2d925871892e1e5ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 13456, "upload_time": "2019-09-24T12:11:01", "url": "https://files.pythonhosted.org/packages/82/f0/13feb096c6b02695be7282c69b705ea213b38f15a766edb56dae243c8bfe/turnt-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6b2544711decf2da95bcee5b09d0e38d", "sha256": "e0cbfa938dd8add18105f0ac5a4ae91b44993e8c8a41b861634e235080877185" }, "downloads": -1, "filename": "turnt-1.2.0.tar.gz", "has_sig": false, "md5_digest": "6b2544711decf2da95bcee5b09d0e38d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 7499, "upload_time": "2019-09-24T12:11:02", "url": "https://files.pythonhosted.org/packages/0f/36/4310e571138d3a3f867591983c293da2980bab3148c27e38e1fa037e7be6/turnt-1.2.0.tar.gz" } ] }