{ "info": { "author": "Fergal Daly", "author_email": "fergald@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Flexible comparison of nested python datastrucures and objects.\n\nComposable \"regular expressions\" for data structures.\n\nThis module allows easy and flexible deep comparisons of\ndatastructure. It's not well documented yet but it's a port to python\nof Test::Deep which is well documented\n(http://search.cpan.org/~fdaly/Test-Deep/).\n\nIt can provide useful output, pin-pointing where 2 items begin to\ndiffer, rather than just returning true or false. This makes it very\nuseful for unit-testing and deep.test provides classes for use with\nunittest.py .\n\nIt allows easy comparison of objects - it just checks that\nthey're in the same class and have the same __dict__.\n\nIt allows set-wise comparison of lists or tuples.\n\nMost importantly it allows aribitrary nesting of the various\ncomparisons and embedding of them inside other datastructures and\nobject. This makes it easy to perform comparisons that would otherwise\nhave been tedious.\n\nIt turns what would have involved lots of looping and iffing and\ncomparing into just putting together a structure that looks like what\nyou're trying to match.\n\nExamples:\n\n###\n# Test that we have a list of objects from the correct classes (yes you\n# can do this easily without deep.py).\n\nthree_types = [deep.InstanceOf(int),\n deep.InstanceOf(list),\n deep.InstanceOf(dict)]\ndiff = deep.diff([1, 2, 3], three_types)\nif diff:\n diff.print_full()\n\n# Outputs\nx[1]:\nExpected: instance of \nActual : instance of \n\n###\n# Test that we have a list of strings that all match a pattern.\n\nlist_of_bings = deep.Elements(deep.Re(\"^bing \"))\ndiff = deep.diff([\"bing bong\", \"bing crosby\", \"bin laden\"], list_of_bings)\nif diff:\n diff.print_full()\n\n# Outputs\nx[2]:\nExpected: something matching '^bing '\nActual : 'bin laden'\n\n###\n\n# Test that we have an object who's \"wibble\" attribute is a dict and\n# that this dict has 3 keys \"time\", \"bings\" and \"things\" and\n# \"time\". We want to make sure that \"time\" is a float and we want to\n# reuse the comparisons from the earlier examples for the other 2\n# keys.\n\ncomplex = deep.Attr(\"wibble\", {\"time\": deep.InstanceOf(float),\n \"bings\": list_of_bings,\n \"things\": three_types})\nclass O(object):\n wibble = {\"time\": 1234.12,\n \"bings\": [\"bing go\"],\n \"things\": [1, [], {}, \"hello\"]}\n\ndiff = deep.diff(O(), complex)\nif diff:\n diff.print_full()\n\n# Outputs\nlen(x.wibble['things']):\n Expected: 3\n Actual : 4 \n", "description_content_type": null, "docs_url": null, "download_url": "http://code.google.com/p/python-deep/downloads/list", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/python-deep/", "keywords": null, "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "deep", "package_url": "https://pypi.org/project/deep/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/deep/", "project_urls": { "Download": "http://code.google.com/p/python-deep/downloads/list", "Homepage": "http://code.google.com/p/python-deep/" }, "release_url": "https://pypi.org/project/deep/0.10/", "requires_dist": null, "requires_python": null, "summary": "Easy, flexible deep comparison and testing of structured data", "version": "0.10" }, "last_serial": 1980176, "releases": { "0.10": [ { "comment_text": "", "digests": { "md5": "62aaae35b8be08b5dae0e728189e2b97", "sha256": "fd692023d65b21c11bdaa38f7b5264d195d2ed678ffc82f841a4a320a8e0127b" }, "downloads": -1, "filename": "deep-0.10.tar.gz", "has_sig": false, "md5_digest": "62aaae35b8be08b5dae0e728189e2b97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18557, "upload_time": "2016-02-28T02:08:03", "url": "https://files.pythonhosted.org/packages/44/0d/ae234be6c9595329de866a17bfb85b41d4761e6252bda9e227559f6f51a7/deep-0.10.tar.gz" } ], "0.2": [], "0.3": [ { "comment_text": "", "digests": { "md5": "5b3a80a0a891c452c5dab9727789bd27", "sha256": "646f2b448f0aba0e328a3936853bcd7b50f09047620d2f906c38f1a0e80732cc" }, "downloads": -1, "filename": "deep-0.3.tar.gz", "has_sig": false, "md5_digest": "5b3a80a0a891c452c5dab9727789bd27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16737, "upload_time": "2007-01-01T15:38:58", "url": "https://files.pythonhosted.org/packages/cc/71/1b95dbc7c6b2ac708538eb0e659d9cf4fbbcd4566078dcf71f151e1c3098/deep-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "bba91e8e518d2efecff79174ae4841ea", "sha256": "19de725ccce23c8e35f7eb3dbc0b13c749983696809e0ee83367a23553870357" }, "downloads": -1, "filename": "deep-0.4.tar.gz", "has_sig": false, "md5_digest": "bba91e8e518d2efecff79174ae4841ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17186, "upload_time": "2007-01-01T16:19:46", "url": "https://files.pythonhosted.org/packages/bc/2d/e33bc40a69b7a572f1d1daff9dcf43830bdd6225d0cb95b1b90306172345/deep-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "66a6d79cac2754111354a63e2828a321", "sha256": "8b1b063d2bb112fee12236a700996bf3d9ab43d294db201e5c337300503b2d04" }, "downloads": -1, "filename": "deep-0.5.tar.gz", "has_sig": false, "md5_digest": "66a6d79cac2754111354a63e2828a321", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18555, "upload_time": "2008-06-03T21:19:21", "url": "https://files.pythonhosted.org/packages/4b/59/33c958b58ed6f9b93dedf38b358a3b2b7097e5f5bb2a3d677a1bbe2948f9/deep-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "63d79bbfce081ea3417ed51d90181705", "sha256": "0847052bae39050d6cdfa98b752b04745bb8fc90c4f948517f5255712f1efd4d" }, "downloads": -1, "filename": "deep-0.6.tar.gz", "has_sig": false, "md5_digest": "63d79bbfce081ea3417ed51d90181705", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18638, "upload_time": "2008-06-06T13:41:19", "url": "https://files.pythonhosted.org/packages/66/08/c064e2ec38b05b7524b01e19f754252c8062cefe7bfcf2954985a66b482f/deep-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "674e9ce0914b8c1f560f5c182ff2cddc", "sha256": "81b1967d9981a83272e546682f0a3d420bec2bd1b4e91f82bf1859806764014c" }, "downloads": -1, "filename": "deep-0.7.tar.gz", "has_sig": false, "md5_digest": "674e9ce0914b8c1f560f5c182ff2cddc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18781, "upload_time": "2008-06-12T21:40:07", "url": "https://files.pythonhosted.org/packages/b8/5d/14c6a7c01057045b1635f9a8e1877344e2ea610c486574154ea3625efd33/deep-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "578ca7cc2e11de9ef6f4fc9b00c2125b", "sha256": "322e5331e435463258856b37b872cf34196327192f6b96e7317aa219e48cbc1b" }, "downloads": -1, "filename": "deep-0.8.tar.gz", "has_sig": false, "md5_digest": "578ca7cc2e11de9ef6f4fc9b00c2125b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18816, "upload_time": "2008-06-12T21:47:25", "url": "https://files.pythonhosted.org/packages/e9/4c/6807ea6bf9499cc1bf1cc232c00f43dbbf1afd74e59c847e53aa8b3f939d/deep-0.8.tar.gz" } ], "0.9": [ { "comment_text": "built for Linux-2.6.32.65-kvm-i386-20150205-hg4accef0bb82b-i686-with-glibc2.7", "digests": { "md5": "ecb82535d1d2fc65528f0dc47bb4e7db", "sha256": "b55f81d6c9c9553549a9d40f476734697dc348da11a966fc9b35f6fd4830704a" }, "downloads": -1, "filename": "deep-0.9.linux-i686.tar.gz", "has_sig": false, "md5_digest": "ecb82535d1d2fc65528f0dc47bb4e7db", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 14562, "upload_time": "2016-02-20T08:10:25", "url": "https://files.pythonhosted.org/packages/7a/04/ad673a09c7ce0ca060821870186a1f58e3ff12c6cd6be0ec40ea8173d965/deep-0.9.linux-i686.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62aaae35b8be08b5dae0e728189e2b97", "sha256": "fd692023d65b21c11bdaa38f7b5264d195d2ed678ffc82f841a4a320a8e0127b" }, "downloads": -1, "filename": "deep-0.10.tar.gz", "has_sig": false, "md5_digest": "62aaae35b8be08b5dae0e728189e2b97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18557, "upload_time": "2016-02-28T02:08:03", "url": "https://files.pythonhosted.org/packages/44/0d/ae234be6c9595329de866a17bfb85b41d4761e6252bda9e227559f6f51a7/deep-0.10.tar.gz" } ] }