• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 16 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Test daemon in Python

Test Daemon

The test daemon watches the content of files in a directory and if any of them changes (the content is edited), it runs the tests.

Installation

Put the tdaemon somewhere where it's executable.

Basic Usage

Simply run this:

$ python /path/to/tdaemon.py

The daemon starts watching the current directory and subdirectories. As soon as one file changes, the daemon runs nosetests and you may watch the result.

Advanced usage

Change the scanned path

If you want to run the daemon from another directory than your current directory, just run:

$ tdaemon.py /path/to/your/project

Change the test program

For example, try out py.test:

$ tdaemon.py --test-program=py

Nosetests is the default test program, but you may use others.

The available test programs are:

Bear in mind that if you want to use one of these program, you must install them on your system.

Note : When you're using django, the path to the project must be the path where manage.py lives.

Add parameters to your test program

Most test programs allow you to test using specifig arguments, to test a small part of your project, or using a specific setting. If you want to append specific arguments to your command line, use the --custom-args parameter like this::

$ tdaemon.py --custom-args="myapp.MyTestClass" --test-program=django

The above command will execute the following command in the current directory:

$ ./manage.py myapp.MyTestClass

Please refer to the test program manual / documentation to find out which additional argument you may use here.

WARNING: Please note that every time you're going to use this option, it will require your confirmation. You are being warned that any command that would break your system, erase some important data, etc. is YOUR PLAIN FAULT!. Not mine. So BE CAREFUL. Please.

The max filesize

The tdaemon first checks the total filesize you want to scan. If the total file size exceeds his quota (which is 25MB by default), the program asks you if you still want to go on with this. You may be informed that scanning large directories may take some time, and thus alter the daemon performances.

You can change this quota by using the --size-max argument. For example:

$ tdaemon --size-max=100

With this argument, the programm will only ask for your permission to proceed with a total archive of more than 100MB.

TODO

[ ] Extend the test utilities to other languages
[ ] Add an "ignore" option to ignore other files (logs, sqlite database,
    image files, etc)
[ ] Check other pythonic dependencies (django, py.test). Won't be possible
    for non-python test-programs, though

Done

[X] implements py.test, if possible
[X] Fixing bug: when a file vanished, the program fails.
[X] I remember I made the first bits of the code after reading an article...
    [X] Find the link and name of the original author
    [X] add appropriate credits
[X] Bugfix: When doing (e.g.) hg commit, it opens temporary files that are
    detected as "changed", and the daemon starts tests. It should be ignored
    (ref. ignore-directories)
[X] Feature: If the scanned directory size if larger than the option limit,
asking for the user to accept processing or not. Default option limit is 25MB
[X] OBSOLETE: Add the possibility to run a custom command.
    (eg. ``python manage.py test myapp.MyTest``)
[X] Erase the custom command option. Too dangerous
[X] Check the only default dependency: ``nosetests``.
[X] Add an "custom argument" option. The user may want to run specific
    commands, but the only way to do so is to send arguments rather than the
    whole external command. Tests must pass, though (no `&`, for example)

More Repositories

1

relax

Free clone of noisli.com - a multiple-file markdown editor, ambient sounds and uncluttered interface
HTML
164
star
2

micro-rpg-catalog

A bunch of resources for micro-mini RPG systems
119
star
3

the-black-hack

The Black Hack RPG text and tables, ready to be translated into your language
Rich Text Format
67
star
4

so1um

So1um is a solo Role Playing Game designed & written by Matt Jackson
CSS
35
star
5

plans-resto-france

Social Web 2.0 crowdsourced plans resto miam c'est bon ™® - patent pending
22
star
6

gemeaux

Gemeaux: a Python Gemini Server
Python
19
star
7

pomodorock

A single webpage pomodoro timer / tracker that keeps ZERO KNOWLEDGE of your data on the server-side.
JavaScript
17
star
8

typographeur

Faire respecter les règles typographiques françaises en HTML (Python).
Python
16
star
9

cmdbot

CmdBot, a bot with `cmd` attitude
Python
15
star
10

neigefr

a ripoff of #snowuk, but for frog-eating people
Python
14
star
11

md2ebook

a markdown to ebook converter, using Calibre or Pandoc and Python Markdown.
Python
13
star
12

rad-hack

The RAD-Hack RPG text and tables, ready to be translated into your language
Python
13
star
13

no-comment

Remove comments on news websites
JavaScript
12
star
14

fu-rpg-libre-et-universel

FU RPG: Libre et Universel
12
star
15

skyfield-data

Minimal data files to work with python-skyfield
Python
11
star
16

ncat-chat

two dummy/minimalist bash scripts for client/server chatting using ncat/netcat
Shell
10
star
17

mdwrangler

an in-browser Markdown to HTML generator ; see it as an experiment
JavaScript
10
star
18

parti-des-geeks

Le programme du parti des geeks
10
star
19

stardrifter

A solo RPG game about being a Trader / Smuggler in a science-fiction galaxy-wide settings
Python
10
star
20

lxcited

A bash-based remote control for LXC containers
Shell
8
star
21

fate-srd-markdown

Fate Core, FAE, Fate Toolkit System SRD extracted as markdown documents
Python
7
star
22

critica

Django-powered CMS
JavaScript
6
star
23

axe-not-axe

A RPG where Dwarves use their Axe to fight and everything else is Not Axe
HTML
6
star
24

microsr

minimalist d6-based rules for old-school roleplaying game
Makefile
6
star
25

django-mini-issue-tracker

Django Mini Issue Tracker
Python
6
star
26

conconf

Réservoir d'idées pour des Conférences à la Con™
5
star
27

lasers-et-sentiments

French translation of Lasers & Feelings - the RPG by John Harper
5
star
28

beeroverip

Beer Over IP - Mirror of the launchpad project
Python
4
star
29

static-markdown

A static HTTP server, with markdown rendering mechanism
Python
4
star
30

onddo-fungi-conlang

4
star
31

redislax

Clutter-less markdown online editor that stores documents in a Redis DB
JavaScript
4
star
32

toki-pona

toki pona related stuff
Python
3
star
33

move-world

This Powered by the Apocalypse tabletop role-playing game is an experiment around the concept of Moves
Makefile
3
star
34

irrefutable

Irréfutable est un jeu narratif minimaliste sans maître de jeu, pour deux joueurs ou plus.
HTML
3
star
35

django-barcamp

A simple Django Barcamp application.
Python
3
star
36

m20-fifth

M20 Fifth (Adamantine Edition) as a markdown
3
star
37

jeu-d-troll

jeu rôles avec troll. pas beaucoup mots, troll comprend tout.
HTML
3
star
38

vousetesleheros

A "gamebook" generator. Python, Yaml, Jinja2 and bit of magic.
JavaScript
3
star
39

colorize

Simply colorize python output
2
star
40

meuhdb

A pseudo JSON keystore that says "meuh"
Python
2
star
41

markdown-lists

Insert new list items in a Github-flavored Markdown document
CoffeeScript
2
star
42

cul-de-chouette-bot

Un Bot pour jouer au Cul de Chouette sur IRC
Python
2
star
43

githubdate

Push a "it's not cool to merge this" status to your pull-requests
Python
2
star
44

centmillemilliardsdepoemes

My personal implementation of Raymond Queneau's "Cent mille milliards de poèmes".
Python
2
star
45

bayonne

Guide personnel et donc partial (partiel) de Bayonne, ma ville de coeur
CSS
2
star
46

vousetesleheros-sudweb2012

Le parcours présenté aux participants de l'Elaboratoire de la conférence Sudweb 2012
JavaScript
2
star
47

lavache

Monty Python's Hommage
2
star
48

the-gobz-hack

a roleplaying game about playing goblins, loosely based on some rules of the black hack.
Makefile
2
star
49

stones

a tabletop roleplaying game about hunters in prehistoric times
HTML
2
star
50

monster-chef-rpg

Cooking for monster - A hellish kitchen role playing game
Python
2
star
51

coucou_suisse

A Mastodon hourly bot to precisely remind you what time it is.
Shell
2
star
52

140cRPG

The Role Playing Game system that fits in a tweet
CSS
1
star
53

vousetesleheros-parisweb2012

JavaScript
1
star
54

snippets

Some snippets to show you my not so über skills in some languages (mainly PHP and Python)
PHP
1
star
55

booklet-boilerplate

Boilerplate for booklet / book generator
Python
1
star
56

ptit-donjon

A tabletop RPG for young kids medieval-fantasy dungeon crawling
HTML
1
star
57

parsely-sudweb-2015

Un jeu collectif sous forme "Parsely Games"
HTML
1
star
58

sss

Django-based scrum management system. As basic as possible, taking advantage of the automagic Django admin contrib.
JavaScript
1
star
59

stagiaires-jdr

Bienvenue à toi, {NOMDUSTAGIAIRE} - un JDR en moins de 250 mots
HTML
1
star
60

sublimetext2-wordcount

A very simple word count plugin for SublimeText2
Python
1
star
61

lady-blackbird-fr

French personal translation of Lady Blackbird (free) Role-Playing Game
Python
1
star
62

redismoitout

Sinatra-based Web Redis Database Admin. Works on small databases. Still young, handle with care
Ruby
1
star
63

ouskonmange

Pick a restaurant
CSS
1
star
64

tiny-dragons-rpg-vf

Traduction en français du jeu de rôle permanent, temps-réel, solo Tiny Dragons
HTML
1
star
65

cards-against-community

Lugradio-Community-based Cards Against Humanity playset
1
star
66

sublimetext2-settings

My settings for Sublime Text 2
Shell
1
star
67

growl-http-proxy

Send Growl notification through a HTTP proxy
Python
1
star
68

ghostlines-fr

French translation of Ghost Lines, a role playing game by John Harper
HTML
1
star
69

nagademon-2014-old

Bruno Bord's entry for NaGaDeMon 2014
JavaScript
1
star
70

meso-conlang

A constructed language dedicated to small-talk about weather
Makefile
1
star
71

willie-diceroll

Willie Bot module: diceroll using random.org API
Python
1
star