Changes

Jump to: navigation, search

Writing a plugin

795 bytes added, 09:28, 1 December 2010
m
Test it
* Check syntax issues with [http://gramps-project.org/wiki/index.php?title=Programming_Guidelines#Pylint pylint]
There is some samples of tests for localized [[Relationship_Calculator#Tests|Relationships calculators]] or [[Date_Handler#How_to_test_a_date_handler_for_your_locale|Date handlers]]: if __name__ == "__main__": # Test function. Call it as follows from the command line (so as to find # imported modules): # export PYTHONPATH=/path/to/gramps/src # python src/plugins/rel/rel_it.py """TRANSLATORS, copy this if statement at the bottom of your rel_xx.py module, and test your work with: python src/plugins/rel/rel_xx.py """ from Relationship import test RC = RelationshipCalculator() test(RC, True) def _test(rc, onlybirth, inlawa, inlawb, printrelstr): """ this is a generic test suite for the singular relationship TRANSLATORS: do NOT translate, use __main__ ! """ import sys import random ...
cd /home/me/grampssvn

Navigation menu