Skip to main content

Run the nose test discovery and execution tool whenever a source file is changed.

Project description

Introduction

Run the nose test discovery and execution tool whenever a source file is changed.

An elaborated version of Jeff Winkler’s nosy tool that runs nose whenever a source file is changed. This version has a command line parser added, and the capability to use a configuration file to control what files are watched, and how nose runs.

Synopsis

$ nosy -h

Usage: nosy [options]

Automatically run nose whenever source files change.

Options:
-h, --help

show this help message and exit

-c CONFIG_FILE, --config=CONFIG_FILE

configuration file path and name; defaults to setup.cfg

Configuration File

Configuration file section contents example:

[nosy]
# Paths to check for changed files; changes cause nose to be run
base_path = ./
glob_patterns = *.py
exclude_patterns = *_flymake.*
extra_paths = sample.cfg
# Command line options to pass to nose
options = -x
# Command line arguments to pass to nose; e.g. part of test suite to run
tests = tests/unit_tests.py

Configuration file is read by a Python standard library ConfigParser object, so:

  • Lines beginning with “#” or “;” are ignored and may be used to provide comments.

  • Entries can be in the form “name: value” or “name=value”, with continuations in the style of RFC 822.

  • Leading whitespace is removed from values.

  • Format string substitution in values is supported.

Within the [nosy] section 6 options may be specified:

  • base_path - The directory in which to start walking the tree to check for changed files. Defaults to ..

  • glob_patterns - A whitespace separated list of shell glob patterns to check for changes. Defaults to *.py.

  • exclude_patterns - A whitespace separated list of shell glob patterns to exclude when checking for changes. Defaults to ‘’.

  • extra_paths - A whitespace separated list of shell glob patterns to add to the paths that are checked for changes. Defaults to ‘’.

  • options - A string of options to be passed through to nose when it is executed.

  • tests - A string of command line arguments to be passed through to nose when it is executed. Useful for specifying part of the test suite to run.

Including the configuration file in the watched paths allows you to change nose’s behaviour on the fly.

The source code and bug tracker for this package is available on Bitbucket.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nosy-1.1.tar.gz (11.2 kB view details)

Uploaded Source

File details

Details for the file nosy-1.1.tar.gz.

File metadata

  • Download URL: nosy-1.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nosy-1.1.tar.gz
Algorithm Hash digest
SHA256 cb385c372257c56a6c8b5b731f5ac45e640d3c38d094fc685ceb3311d0a00fc3
MD5 66eb1135d011a56b8c82ec811a8d7be2
BLAKE2b-256 5334188ad6b5581788d6d432454b94b291b231badf00e6ef5c41add46c40861f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page