{
"info": {
"author": "Gregory Crosswhite",
"author_email": "gcrosswhite@gmail.com",
"bugtrack_url": null,
"classifiers": [],
"description": "Hey! PayCheck!\n--------------\n\nPayCheck is a half-baked implementation of\n`ScalaCheck `_, which itself is an\nimplementation of\n`QuickCheck `_ for\nHaskell. PayCheck is useful for defining a specification of what a\nfunction\nshould do, rather than testing its results for a given input.\n\nThanks to gcross for some of the `more recent\nchanges `_\n\nInstalling PayCheck\n~~~~~~~~~~~~~~~~~~~\n\n::\n\n \n sudo easy_install paycheck\n \n\nThat\u2019s it. Get going.\n\nA Quick Example\n~~~~~~~~~~~~~~~\n\nLet\u2019s steal an example right from ScalaCheck. Here are the string\nfunctions\nported to PayCheck. See what\u2019s going on? We\u2019re defining the types of the\nparameters in with\\_checker, then values of that type are getting passed\nto the\nfunction.\n\n::\n\n \n import unittest\n from paycheck import with_checker\n\n class TestStrings(unittest.TestCase):\n \"\"\"\n More-or-less a direct port of the string testing example from the ScalaCheck\n doc at: http://code.google.com/p/scalacheck/\n \"\"\"\n\n @with_checker(str, str)\n def test_starts_with(self, a, b):\n self.assertTrue((a+b).startswith(a))\n\n @with_checker(str, str)\n def test_ends_with(self, a, b):\n self.assertTrue((a+b).endswith(b))\n\n # Is this really always true?\n @with_checker(str, str)\n def test_concat(self, a, b):\n self.assertTrue(len(a+b) > len(a))\n self.assertTrue(len(a+b) > len(b))\n\n @with_checker(str, str)\n def test_substring2(self, a, b):\n self.assertEquals( (a+b)[len(a):], b )\n\n @with_checker(str, str, str)\n def test_substring3(self, a, b, c):\n self.assertEquals((a+b+c)[len(a):len(a)+len(b)], b)\n\n if __name__ == '__main__':\n unittest.main()\n \n\nThen give the ol\u2019 test a run. You\u2019ll likely see a problem:\n\n::\n\n \n $ python test_strings.py\n F....\n ======================================================================\n FAIL: test_concat (__main__.TestStrings)\n ----------------------------------------------------------------------\n Traceback (most recent call last):\n File \"paycheck/checker.py\", line 11, in wrapper\n test_func(self, *v)\n File \"test_strings.py\", line 20, in test_concat\n self.assertTrue(len(a+b) > len(a))\n AssertionError: Failed for input ('UGzo2LP<(9Gl_*o*GH$H<+{wPiNk?', '')\n\n ----------------------------------------------------------------------\n Ran 5 tests in 0.051s\n\n FAILED (failures=1)\n \n\nAs predicted, test_concat has bombed; note that PayCheck is nice\nenough to tell you which inputs caused the problem. In this case, we\nsee that propety test_concat fails for the empty string, which is caused\nby the fact that we used \u201c>\u201d instead of \u201c>=\u201d.\n\nNested and More Complex Types\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nContainer and nested types are specified to PayCheck \u201cby analogy\u201d.\nThat is, unlike scalar types, which are specified by giving the type\nthat you want, container types are specified by creating a non-empty\ncontainer of the type you want which contains a specification of the\ntype that you want generated containers to contain; note that the\ncontained element is itself allowed to be a container, allowing for\narbitrarily nested types. PayCheck will infer from your containers\nthe type of container and contained elements that you want to\ngenerate. This includes dictionaries: it will look at the first\nkey/value mapping that it sees and infer from it both the key type and\nthe value type. Containers will be generated with between 0 and\npaycheck.generator.LIST\\_LEN elements.\n\nThe following examples illustrate how this works:\n\n::\n\n \n import unittest\n from paycheck import with_checker\n\n class TestTypes(unittest.TestCase):\n\n @with_checker(int)\n def test_int(self, i):\n self.assertTrue(isinstance(i, int))\n\n @with_checker([int])\n def test_get_list(self, list_of_ints):\n self.assertTrue(isinstance(list_of_ints, list))\n for i in list_of_ints:\n self.assertTrue(isinstance(i, int))\n\n @with_checker([{str: int}])\n def test_list_of_dict_of_int_string(self, list_of_dict_of_int_string):\n self.assertTrue(isinstance(list_of_dict_of_int_string, list))\n\n for dict_of_int_string in list_of_dict_of_int_string:\n self.assertTrue(isinstance(dict_of_int_string, dict))\n\n for key, value in dict_of_int_string.items():\n self.assertTrue(isinstance(key, str))\n self.assertTrue(isinstance(value, int))\n\n if __name__ == '__main__':\n unittest.main()\n ",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/gcross/paycheck",
"keywords": null,
"license": "ISC",
"maintainer": null,
"maintainer_email": null,
"name": "paycheck",
"package_url": "https://pypi.org/project/paycheck/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/paycheck/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://github.com/gcross/paycheck"
},
"release_url": "https://pypi.org/project/paycheck/1.0.2/",
"requires_dist": null,
"requires_python": null,
"summary": "A Python QuickCheck implementation",
"version": "1.0.2"
},
"last_serial": 768664,
"releases": {
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "aa92555c7a65c69a50ea08909114b5ec",
"sha256": "0a4767b3e6b2b3cfda893b63c9d0fcd0730d97aa6f12ba97c1531ee4d6c0a53e"
},
"downloads": -1,
"filename": "paycheck-0.3.tar.gz",
"has_sig": false,
"md5_digest": "aa92555c7a65c69a50ea08909114b5ec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2948,
"upload_time": "2009-02-25T05:15:22",
"url": "https://files.pythonhosted.org/packages/80/33/5a57907973dc02358cba40367248be9cd65d0e9ae3b570b02ad5029390d1/paycheck-0.3.tar.gz"
}
],
"0.4": [
{
"comment_text": "",
"digests": {
"md5": "fc17d2e5cec9d63d36c6bc0b42402a8f",
"sha256": "29d3ce05a105967e3229a9d01c3fd01f6f003e166834f62f57fdb9d673502a29"
},
"downloads": -1,
"filename": "paycheck-0.4.tar.gz",
"has_sig": false,
"md5_digest": "fc17d2e5cec9d63d36c6bc0b42402a8f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2973,
"upload_time": "2009-04-09T05:30:07",
"url": "https://files.pythonhosted.org/packages/07/57/c0c92467076b1d7fc66bbeafacef06e75031c4cd6d7715824db1fefd0542/paycheck-0.4.tar.gz"
}
],
"0.4.1": [
{
"comment_text": "",
"digests": {
"md5": "3835f09f9db3b123084a03398c423fa2",
"sha256": "0cb907124efef37531a3e05c6649a42e8a182d3583810b11d8987f8feb0ac6b9"
},
"downloads": -1,
"filename": "paycheck-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "3835f09f9db3b123084a03398c423fa2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2998,
"upload_time": "2009-04-09T07:09:08",
"url": "https://files.pythonhosted.org/packages/6b/0d/bc349869ea3bc2fe003358e956eb8f4c3843b333779d9a213b9652bd3c16/paycheck-0.4.1.tar.gz"
}
],
"0.4.2": [
{
"comment_text": "",
"digests": {
"md5": "e0a21216a8b8c2071ba8f06e776ac9d4",
"sha256": "5351e4eab9da0bb46802b1cdb4840fa691d861e4df8c325c61a04af97c78c8b4"
},
"downloads": -1,
"filename": "paycheck-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "e0a21216a8b8c2071ba8f06e776ac9d4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3053,
"upload_time": "2009-04-14T04:28:02",
"url": "https://files.pythonhosted.org/packages/a2/e7/a22e97876ed469d4f39563f9b7f3717c6df114359903528d449f5962b29d/paycheck-0.4.2.tar.gz"
}
],
"0.4.4": [
{
"comment_text": "built for Linux-2.6.38-11-generic-x86_64-with-glibc2.4",
"digests": {
"md5": "0241a1292776e1d0d82b74c105984f6a",
"sha256": "daeea8772a553b87ce83872cd0a9dcf436905e3cd9c913222fc7f3ab0e5ab524"
},
"downloads": -1,
"filename": "paycheck-0.4.4.linux-x86_64.tar.gz",
"has_sig": false,
"md5_digest": "0241a1292776e1d0d82b74c105984f6a",
"packagetype": "bdist_dumb",
"python_version": "any",
"requires_python": null,
"size": 6533,
"upload_time": "2011-10-10T04:49:53",
"url": "https://files.pythonhosted.org/packages/50/88/ce0fabc2b9b4cdc43badccc5d5747cc1b18e87ef097f17faae013858e6b8/paycheck-0.4.4.linux-x86_64.tar.gz"
},
{
"comment_text": "",
"digests": {
"md5": "38bffac0fccdf434eb0f6010144e32e4",
"sha256": "a9b77ecb3cbb813f1eec6ba8ea94b614e2fba85452b697f6b74646aff438517e"
},
"downloads": -1,
"filename": "paycheck-0.4.4.tar.gz",
"has_sig": false,
"md5_digest": "38bffac0fccdf434eb0f6010144e32e4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2862,
"upload_time": "2011-10-07T17:41:53",
"url": "https://files.pythonhosted.org/packages/99/8c/710eefe2dbd40cdeeaca2c1556b5c41e59a7985fa20999cc27f4e4ac8824/paycheck-0.4.4.tar.gz"
}
],
"0.4.5": [
{
"comment_text": "built for Linux-2.6.38-11-generic-x86_64-with-glibc2.4",
"digests": {
"md5": "f68af5ab700aaa7ad7529bda21ea2d94",
"sha256": "079c340c010c298cfab4e39126ed2a3fca4abc8d1b4e228f384780979d75d469"
},
"downloads": -1,
"filename": "paycheck-0.4.5.linux-x86_64.tar.gz",
"has_sig": false,
"md5_digest": "f68af5ab700aaa7ad7529bda21ea2d94",
"packagetype": "bdist_dumb",
"python_version": "any",
"requires_python": null,
"size": 6534,
"upload_time": "2011-10-10T04:50:14",
"url": "https://files.pythonhosted.org/packages/49/c4/72675b10739be9b045dc9c4a912b0340ec17458e54e49f16ca89373c3b65/paycheck-0.4.5.linux-x86_64.tar.gz"
}
],
"0.4.6": [
{
"comment_text": "",
"digests": {
"md5": "24a4527f7fc96f4d0cc5342345b940ee",
"sha256": "8e9a6d9dd6080c4820a75bc282794f87b7e2bdc7dcb4888f93c6e3b764c97d91"
},
"downloads": -1,
"filename": "paycheck-0.4.6.tar.gz",
"has_sig": false,
"md5_digest": "24a4527f7fc96f4d0cc5342345b940ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2938,
"upload_time": "2011-10-10T09:23:37",
"url": "https://files.pythonhosted.org/packages/5a/78/ecb80e4455a917328a0fb1bbf359a7d1a4512237f9b10b75595d9f9730ab/paycheck-0.4.6.tar.gz"
}
],
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "62ece618bc38f01ce06a918307c0814c",
"sha256": "55f42db58fca72370f0d710dd31356ae60291636e6b94bf0362d82fdb2ffec2c"
},
"downloads": -1,
"filename": "paycheck-1.0.tar.gz",
"has_sig": false,
"md5_digest": "62ece618bc38f01ce06a918307c0814c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7523,
"upload_time": "2011-11-11T03:07:34",
"url": "https://files.pythonhosted.org/packages/1c/74/98c77fab0d8190e2139e88eb9372131681bf47f9915d173dd828585a53ea/paycheck-1.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "7a18834af5284d3ba78a7cedc076c554",
"sha256": "4156c99c0ff98b76b5022ed02ffa7bf35a74c7afd440dcdaaf7b45e1fee36969"
},
"downloads": -1,
"filename": "paycheck-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "7a18834af5284d3ba78a7cedc076c554",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8061,
"upload_time": "2011-11-11T03:16:15",
"url": "https://files.pythonhosted.org/packages/bf/e7/59a59b6c06b5421ad3c8a79d9683f83ed9e56cac1366fe2a48ebaf1272b0/paycheck-1.0.1.tar.gz"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "e42a3032221bc56ae9382159cd6a3807",
"sha256": "6db7fc367c146cd59d2327ad4d2d6b0a24bc1be2d6953bb0773cbf702ee1ed34"
},
"downloads": -1,
"filename": "paycheck-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "e42a3032221bc56ae9382159cd6a3807",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8051,
"upload_time": "2011-11-11T03:25:06",
"url": "https://files.pythonhosted.org/packages/8a/de/7f285776c6eed157e1d61d5a92f1dfc576fe3da108bf3538af35e06b1c9d/paycheck-1.0.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e42a3032221bc56ae9382159cd6a3807",
"sha256": "6db7fc367c146cd59d2327ad4d2d6b0a24bc1be2d6953bb0773cbf702ee1ed34"
},
"downloads": -1,
"filename": "paycheck-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "e42a3032221bc56ae9382159cd6a3807",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8051,
"upload_time": "2011-11-11T03:25:06",
"url": "https://files.pythonhosted.org/packages/8a/de/7f285776c6eed157e1d61d5a92f1dfc576fe3da108bf3538af35e06b1c9d/paycheck-1.0.2.tar.gz"
}
]
}