{
"info": {
"author": "Jesse Noller",
"author_email": "jnoller@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Topic :: Software Development :: Testing"
],
"description": "==========\ntestconfig\n==========\n\n* Project hosting: \n\n.. contents::\n\nAbout\n------------------\n\nWritten by Jesse Noller \nLicensed under the Apache Software License, 2.0\n\nYou can install it with ``pip install nose-testconfig``\n\nWhat It Does\n------------\n\nnose-testconfig is a plugin to the nose test framework which provides a\nfaculty for passing test-specific (or test-run specific) configuration data\nto the tests being executed.\n\nCurrently configuration files in the following formats are supported:\n\n- YAML (via `PyYAML `_)\n- INI (via `ConfigParser `_)\n- Pure Python (via Exec)\n- JSON (via `JSON `_)\n\nThe plugin is ``meant`` to be flexible, ergo the support of exec'ing arbitrary\npython files as configuration files with no checks. The default format is \nassumed to be ConfigParser ini-style format.\n\nIf multiple files are provided, the objects are merged. Later settings will\noverride earlier ones.\n\nThe plugin provides a method of overriding certain parameters from the command \nline (assuming that the main \"config\" object is a dict) and can easily have \nadditional parsers added to it.\n\nA configuration file may not be provided. In this case, the config object is an\nemtpy dict. Any command line \"overriding\" paramters will be added to the dict.\n\nTest Usage\n----------\n\nFor now (until something better comes along) tests can import the \"config\" \nsingleton from testconfig::\n\n from testconfig import config\n\nBy default, YAML files parse into a nested dictionary, and ConfigParser ini\nfiles are also collapsed into a nested dictionary for foo[bar][baz] style\naccess. Tests can obviously access configuration data by referencing the \nrelevant dictionary keys::\n\n from testconfig import config\n def test_foo():\n target_server_ip = config['servers']['webapp_ip']\n\n``Warning``: Given this is just a dictionary singleton, tests can easily write\ninto the configuration. This means that your tests can write into the config\nspace and possibly alter it. This also means that threaded access into the\nconfiguration can be interesting.\n\nWhen using pure python configuration - obviously the \"sky is the the limit\" - \ngiven that the configuration is loaded via an exec, you could potentially\nmodify nose, the plugin, etc. However, if you do not export a config{} dict\nas part of your python code, you obviously won't be able to import the \nconfig object from testconfig.\n\nWhen using YAML-style configuration, you get a lot of the power of pure python\nwithout the danger of unprotected exec() - you can obviously use the pyaml \npython-specific objects and all of the other YAML creamy goodness.\n\nDefining a configuration file\n-----------------------------\n\nSimple ConfigParser style::\n\n [myapp_servers]\n main_server = 10.1.1.1\n secondary_server = 10.1.1.2\n\nSo your tests access the config options like this::\n\n from testconfig import config\n def test_foo():\n main_server = config['myapp_servers']['main_server']\n\nYAML style configuration::\n myapp:\n servers:\n main_server: 10.1.1.1\n secondary_server: 10.1.1.2\n\nAnd your tests can access it thus::\n\n from testconfig import config\n def test_foo():\n main_server = config['myapp']['servers']['main_server']\n\nPython configuration file::\n\n import socket\n\n global config\n config = {}\n possible_main_servers = ['10.1.1.1', '10.1.1.2']\n\n for srv in possible_main_servers:\n try:\n s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n s.connect((srv, 80))\n except:\n continue\n s.close()\n config['main_server'] = srv\n break\n\nAnd lo, the config is thus::\n\n from testconfig import config\n def test_foo():\n main_server = config['main_server']\n\nIf you need to put python code into your configuration, you either need to use\nthe python-config file faculties, or you need to use the !!python tags within\nPyYAML/YAML - raw ini files no longer have any sort of eval magic.\n\nCommand line options\n--------------------\n\nAfter it is installed, the plugin adds the following command line flags to \nnosetests::\n\n --tc-file=TESTCONFIG Configuration file to parse and pass to tests\n [NOSE_TEST_CONFIG_FILE]\n If this is specified multiple times, all files\n will be parsed. In all formats except python,\n previous contents are preserved and the configs\n are merged.\n\n --tc-format=TESTCONFIGFORMAT Test config file format, default is\n configparser ini format\n [NOSE_TEST_CONFIG_FILE_FORMAT]\n\n --tc=OVERRIDES Option:Value specific overrides.\n\n --tc-exact Optional: Do not explode periods in override keys to\n individual keys within the config dict, instead treat\n them as config[my.toplevel.key] ala sqlalchemy.url in\n pylons.\n\n\nPassing in an INI configuration file::\n\n $ nosetests -s --tc-file example_cfg.ini\n\nPassing in a YAML configuration file::\n\n $ nosetests -s --tc-file example_cfg.yaml --tc-format yaml\n\nPassing in a Python configuration file::\n\n $ nosetests -s --tc-file example_cfg.py --tc-format python\n\nPassing in multiple INI configuration files::\n\n $ nosetests -s --tc-file example_cfg.ini --tc-file example_cfg2.ini\n\nOverriding a configuration value on the command line::\n\n $ nosetests -s --tc-file example_cfg.ini --tc=myvalue.sub:bar\n\nPassing parameters on the command line without specifying a configuration file::\n\n $ nosetests -s --tc=myvalue.sub2:baz\n\nOverriding multiple key:value pairs::\n\n $ nosetests -s --tc-file example_cfg.ini --tc=myvalue.sub:bar \\\n --tc=myvalue.sub2:baz --tc=myvalue.sub3:bar3\n\n\n``Warning``: When using the --tc= flag, you can pass it in as many times as\nyou want to override as many keys/values as needed. The format is in\n``parent.child.child = value`` format - the periods are translated into keys\nwithin the config dict, for example::\n\n myvalue.sub2:baz = config[myvalue][sub2] = baz\n\nYou can override the explosion of the periods by passing in the --tc-exact \nargument on the command line.\n\nSpecial environment variables\n-----------------------------\n\nIf you have a test which performs an import like this::\n\n from testconfig import config\n\nThen you know you can not run your test through a tool like pychecker as \npychecker executes the file you are scanning, an warning is thrown and any use\nof the config dict will cause an exception.\n\nTo work around this, I've added four environment variable checks which, if \nset will cause a given configuration file to be auto-loaded into the module\nand the config dict will be populated. These are::\n\n NOSE_TESTCONFIG_AUTOLOAD_YAML\n NOSE_TESTCONFIG_AUTOLOAD_INI\n NOSE_TESTCONFIG_AUTOLOAD_PYTHON\n NOSE_TESTCONFIG_AUTOLOAD_JSON\n\nSetting one of these to ``full path`` of the target configuration file in your\nenvironment/editor/etc will make it auto load that configuration file. You can\nnow run it through pychecker. Much success was had!\n\nFor example, I set NOSE_TESTCONFIG_AUTOLOAD_YAML to /Users/jesse/foo.yaml \nwithin textmate. I can now use pychecker via control-shift-v with much win.\n\nChanges & News\n--------------\n0.10:\n * support multiple config files\n\n0.9.1:\n * update tox with pypy and py34\n * advertise with classifiers that nose-testconfig is py2 and py3 compatible\n\n0.9:\n * Python 3 compatible\n * fix loading of data files when environment variables\n NOSE_TESTCONFIG_AUTOLOAD_* are specified.\n * added tests\n\n0.8:\n * unicode support for config files (gjednaszewski/dhellmann)\n * colons are allowed in user's arguments, such as --tc url:127.0.0.1:5000 (aconrad)\n * config file is not longer required, --tc option may be provided alone (aconrad)\n\n0.7:\n * Add ability to handle json format.\n\n0.6:\n * Add in checking for 3 different environment variables corresponding to\n the supported config file types. Setting one of these to the full path\n to a given configuration file will force nose-testconfig to autoload that\n file. Handy if you want to run a test which imports the testconfig module\n through something like pychecker (or run it from the command line).\n\n0.5:\n * Fix a bug in the python config file parsing reported by Christopher Hesse\n\n0.4:\n * Per feedback from Kumar and others, the eval()'ing of ini-file values \n has been removed: allowing arbitrary python in the values was more \n annoying less standard then was worth it.\n * Added the --tc-exact command line flag, to block the exploding of \n name.name values into dicts-within-dicts\n * Updated the docs to parse right.\n\n0.3: \n Fix documentation examples per Kumar's feedback.\n\n0.2:\n Fix pypi packaging issues\n\n0.1:\n Initial release. May contain bits of glass.",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "",
"keywords": "",
"license": "Apache License, Version 2.0",
"maintainer": "",
"maintainer_email": "",
"name": "nose-testconfig",
"package_url": "https://pypi.org/project/nose-testconfig/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/nose-testconfig/",
"project_urls": null,
"release_url": "https://pypi.org/project/nose-testconfig/0.10/",
"requires_dist": null,
"requires_python": "",
"summary": "Test Configuration plugin for nosetests.",
"version": "0.10"
},
"last_serial": 1737160,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "d20a008c2719e7c41e05280d10adf72c",
"sha256": "44b7c4147fd1c42bd09a4b2cd59fd540df54a579c9591b81962cafba6f981fca"
},
"downloads": -1,
"filename": "nose-testconfig-0.1.tar.gz",
"has_sig": false,
"md5_digest": "d20a008c2719e7c41e05280d10adf72c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4632,
"upload_time": "2008-07-28T17:36:56",
"url": "https://files.pythonhosted.org/packages/91/cc/6f5ff034c39852a2a445928985e89ba548b59aad9e512476c1ae5d3dfd8c/nose-testconfig-0.1.tar.gz"
}
],
"0.10": [
{
"comment_text": "",
"digests": {
"md5": "e101cee1dd5524144795eabe3f8848e5",
"sha256": "4e8faca74f4925ac02ac89917b43cabc3ff7f6b2a4b1d4c38e92f6f30cf808f0"
},
"downloads": -1,
"filename": "nose_testconfig-0.10-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e101cee1dd5524144795eabe3f8848e5",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 11273,
"upload_time": "2015-09-24T22:21:41",
"url": "https://files.pythonhosted.org/packages/8f/0f/1e3aafb871769d58608be881b923c84045ed5307ccd993e42700061d7c91/nose_testconfig-0.10-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2ff0a26ca9eab962940fa9b1b8e97995",
"sha256": "54328a20ee8e8f877ba31af9ba76f29aa8254581b0ba57d8e306f37b8e1a94c8"
},
"downloads": -1,
"filename": "nose-testconfig-0.10.tar.gz",
"has_sig": false,
"md5_digest": "2ff0a26ca9eab962940fa9b1b8e97995",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9390,
"upload_time": "2015-09-24T22:21:44",
"url": "https://files.pythonhosted.org/packages/a0/1a/9bb934f1274715083cfe8139d7af6fa78ca5437707781a1dcc39a21697b4/nose-testconfig-0.10.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "5a1aa7b9bc75ed83c542a494a8e4d733",
"sha256": "8fcb31a15199b4f3898e34ce286a96c8ed3b89833866c592251027e9dd76a20c"
},
"downloads": -1,
"filename": "nose-testconfig-0.2.tar.gz",
"has_sig": false,
"md5_digest": "5a1aa7b9bc75ed83c542a494a8e4d733",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6662,
"upload_time": "2008-07-28T17:47:50",
"url": "https://files.pythonhosted.org/packages/70/39/e51d68f006dd12cb1995d9ed2d65b3e6af9c69d2239658ec076cef5b16ad/nose-testconfig-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "5e845d11a66a13b0706bf5a354214f5e",
"sha256": "3c988f81e2ce669707d67c2c90789a501ed3dc12440f0323f6d61484b31da1ba"
},
"downloads": -1,
"filename": "nose-testconfig-0.3.tar.gz",
"has_sig": false,
"md5_digest": "5e845d11a66a13b0706bf5a354214f5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6739,
"upload_time": "2008-07-28T19:52:22",
"url": "https://files.pythonhosted.org/packages/e6/8f/fa61ff0735d94af520e20c2e426eac51f64f3355eea4e40ce14104909284/nose-testconfig-0.3.tar.gz"
}
],
"0.4": [
{
"comment_text": "",
"digests": {
"md5": "e9ba49dcb7fefa5393d11afa98385a7e",
"sha256": "d658648a6a9eff77efc421e24df3f1723c1f78a37a4403ebdb6e18f563c41d69"
},
"downloads": -1,
"filename": "nose-testconfig-0.4.tar.gz",
"has_sig": false,
"md5_digest": "e9ba49dcb7fefa5393d11afa98385a7e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7742,
"upload_time": "2008-10-08T21:00:50",
"url": "https://files.pythonhosted.org/packages/cf/fb/e46c224d2ababe31e9fc059046d1fb6cc7224815dfad786601644192e229/nose-testconfig-0.4.tar.gz"
}
],
"0.5": [
{
"comment_text": "",
"digests": {
"md5": "38ae974b2ce5720b1b6b9e6136c424aa",
"sha256": "cf338c471ee980f383f49d28b805a822f883a1da257c1bafb3ab04ccd80d3c86"
},
"downloads": -1,
"filename": "nose-testconfig-0.5.tar.gz",
"has_sig": false,
"md5_digest": "38ae974b2ce5720b1b6b9e6136c424aa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7531,
"upload_time": "2008-10-23T13:08:13",
"url": "https://files.pythonhosted.org/packages/03/e8/454ba7edde52bfc0c67bfc6ebcd1ca6d288b5bde3e4339dad9dad831a021/nose-testconfig-0.5.tar.gz"
}
],
"0.6": [
{
"comment_text": "",
"digests": {
"md5": "869227b30f29a63f44c291548240460d",
"sha256": "4f422ed590b97670826402307e6e6de5a7a45e1113e467ea94e4a1468896f235"
},
"downloads": -1,
"filename": "nose-testconfig-0.6.tar.gz",
"has_sig": false,
"md5_digest": "869227b30f29a63f44c291548240460d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7737,
"upload_time": "2009-01-07T18:03:08",
"url": "https://files.pythonhosted.org/packages/94/15/adca3dd5ca86ec62c5e71f3b3e35c925025733b9c13ebb29d838ecec57cc/nose-testconfig-0.6.tar.gz"
}
],
"0.8": [
{
"comment_text": "",
"digests": {
"md5": "1157db1ef688a9851f12408cd7f8c084",
"sha256": "cde6a8558e3d246da30021c723c1b8ffc9d59426507ad12c362764ca797aa86e"
},
"downloads": -1,
"filename": "nose-testconfig-0.8.tar.gz",
"has_sig": false,
"md5_digest": "1157db1ef688a9851f12408cd7f8c084",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7440,
"upload_time": "2011-04-20T03:50:37",
"url": "https://files.pythonhosted.org/packages/34/13/14e9f8266dc8c39131c59d55e77e74ea0464183621089654a90903ea79fe/nose-testconfig-0.8.tar.gz"
}
],
"0.9": [
{
"comment_text": "",
"digests": {
"md5": "bd4480f8685cf6500058f9d94f672e35",
"sha256": "bb6f1dd2dbd3e54a6c456110fb6dced449b5ad5262af712d595c123e4f8c34d3"
},
"downloads": -1,
"filename": "nose-testconfig-0.9.tar.gz",
"has_sig": false,
"md5_digest": "bd4480f8685cf6500058f9d94f672e35",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7614,
"upload_time": "2013-04-19T22:47:09",
"url": "https://files.pythonhosted.org/packages/a5/f7/735c91bb9f660ae0fa46fed1794ebb7799fd6afbb58b2fb48dd211b82e0e/nose-testconfig-0.9.tar.gz"
}
],
"0.9.1": [
{
"comment_text": "",
"digests": {
"md5": "01e69f7c232bde77febdd264ea867989",
"sha256": "94e78ced250c47706aaaf17af0f390d9b02eeb5d84e68ecc0b1982965db7f82c"
},
"downloads": -1,
"filename": "nose-testconfig-0.9.1.tar.gz",
"has_sig": false,
"md5_digest": "01e69f7c232bde77febdd264ea867989",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7855,
"upload_time": "2015-03-25T17:44:33",
"url": "https://files.pythonhosted.org/packages/30/49/86416d32d105822836940e2c8a02a1c54a66803598f2e9507b665f4dc3d7/nose-testconfig-0.9.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e101cee1dd5524144795eabe3f8848e5",
"sha256": "4e8faca74f4925ac02ac89917b43cabc3ff7f6b2a4b1d4c38e92f6f30cf808f0"
},
"downloads": -1,
"filename": "nose_testconfig-0.10-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e101cee1dd5524144795eabe3f8848e5",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 11273,
"upload_time": "2015-09-24T22:21:41",
"url": "https://files.pythonhosted.org/packages/8f/0f/1e3aafb871769d58608be881b923c84045ed5307ccd993e42700061d7c91/nose_testconfig-0.10-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2ff0a26ca9eab962940fa9b1b8e97995",
"sha256": "54328a20ee8e8f877ba31af9ba76f29aa8254581b0ba57d8e306f37b8e1a94c8"
},
"downloads": -1,
"filename": "nose-testconfig-0.10.tar.gz",
"has_sig": false,
"md5_digest": "2ff0a26ca9eab962940fa9b1b8e97995",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9390,
"upload_time": "2015-09-24T22:21:44",
"url": "https://files.pythonhosted.org/packages/a0/1a/9bb934f1274715083cfe8139d7af6fa78ca5437707781a1dcc39a21697b4/nose-testconfig-0.10.tar.gz"
}
]
}