Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Quality Assurance and Testing

    nose-testconfig 0.8

    Download button

    No screenshots available
    Downloads: 369  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jesse Noller | More programs
    The Apache License 2.0 / FREE
    April 20th, 2011, 21:18 GMT [view history]
    ROOT / Programming / Quality Assurance and Testing

     Read user reviews (0)  Refer to a friend  Subscribe

    nose-testconfig description

    Test configuration plugin for Nose

    nose-testconfig is a simple test configuration plugin for nose designed to easily allow data about a system-under-test to be passed in via a configuration file via nosetests.

    It is meant to be simple, flexible and clear. It current support YAML, INI and pure Python configuration files.

    What It Does

    nose-testconfig is a plugin to the nose test framework which provides a faculty for passing test-specific (or test-run specific) configuration data to the tests being executed.

    Currently configuration files in the following formats are supported:

     * YAML (via PyYAML)
     * INI (via ConfigParser)
     * Pure Python (via Exec)

    The plugin is meant to be flexible, ergo the support of exec'ing arbitrary python files as configuration files with no checks. The default format is assumed to be ConfigParser ini-style format.

    The plugin provides a method of overriding certain parameters from the command line (assuming that the main "config" object is a dict) and can easily have additional parsers added to it.

    Test Usage

    For now (until something better comes along) tests can import the "config" singleton from testconfig:

    from testconfig import config

    By default, YAML files parse into a nested dictionary, and ConfigParser ini files are also collapsed into a nested dictionary for foo[bar][baz] style access. Tests can obviously access configuration data by referencing the relevant dictionary keys:

    from testconfig import config
    def test_foo():
     target_server_ip = config['servers']['webapp_ip']


    Warning: Given this is just a dictionary singleton, tests can easily write into the configuration. This means that your tests can write into the config space and possibly alter it. This also means that threaded access into the configuration can be interesting.

    When using pure python configuration - obviously the "sky is the the limit" - given that the configuration is loaded via an exec, you could potentially modify nose, the plugin, etc. However, if you do not export a config{} dict as part of your python code, you obviously won't be able to import the config object from testconfig.

    When using YAML-style configuration, you get a lot of the power of pure python without the danger of unprotected exec() - you can obviously use the pyaml python-specific objects and all of the other YAML creamy goodness.


    Product's homepage

    Requirements:

    · Python

    What's New in This Release: [ read full changelog ]

    · unicode support for config files (dhellmann)
    · colons are allowed in user's arguments, such as --tc url:127.0.0.1:5000 (aconrad)
    · config file is not longer required, --tc option may be provided alone (aconrad)

      


    TAGS:

    test configuration | Nose plugin | Python library | Nose | test | configuration

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM