Project

General

Profile

Revision a2d3e48e

IDa2d3e48ec50e04ff06918cd1853b6b1a855eaf6f
Parent 693e96f1
Child f70865a8

Added by Aurelien BOMPARD about 15 years ago

Generation d'API, tests unitaires

git-svn-id: https://vigilo-dev.si.c-s.fr/svn@540 b22e2e97-25c9-44ff-b637-2e5ceca36478

View differences:

Makefile
1 1
NAME = vigiboard
2 2
BUILDENV = ../glue
3
PYTHON = $(BUILDENV)/bin/python
3 4

  
4 5
all:
5 6
	@echo "Template Makefile, to be filled with build and install targets"
6 7

  
7
$(BUILDENV)/bin/python $(BUILDENV)/bin/paster:
8
$(PYTHON):
8 9
	make -C $(BUILDENV) bin/python
9 10

  
10 11
clean:
11 12
	find $(CURDIR) \( -name "*.pyc" -o -name "*~" \) -delete
13
	rm -rf data # temporary: sessions
12 14

  
13 15
buildclean: clean
14 16
	rm -rf eggs develop-eggs parts .installed.cfg bin
15 17

  
16 18
apidoc: doc/apidoc/index.html
17
doc/apidoc/index.html: $(NAME)
19
doc/apidoc/index.html: $(PYTHON) $(NAME)
18 20
	rm -rf $(CURDIR)/doc/apidoc/*
19
	PYTHONPATH=src epydoc -o $(dir $@) -v \
21
	PYTHONPATH=$(BUILDENV):src $(PYTHON) "$$(which epydoc)" -o $(dir $@) -v \
20 22
		   --name Vigilo --url http://www.projet-vigilo.org \
21
		   --docformat=epytext $^
23
		   --docformat=epytext $(NAME)
22 24

  
23
lint:
24
	$(BUILDENV)/bin/python ./pylint_vigiboard.py $(NAME)
25
lint: $(PYTHON)
26
	$(PYTHON) ./pylint_vigiboard.py $(NAME)
25 27

  
26
tests:
27
	PYTHONPATH=$(BUILDENV) VIGILO_SETTINGS_MODULE=settings_tests $(BUILDENV)/bin/python "$$(which nosetests)" --with-coverage --cover-inclusive --cover-erase --cover-package $(NAME) $(NAME)/tests
28
tests: $(PYTHON)
29
	PYTHONPATH=$(BUILDENV) $(BUILDENV)/bin/runtests-$(NAME)
28 30

  
29 31

  
30 32
.PHONY: all clean buildclean apidoc lint tests
test.ini
16 16
port = 5000
17 17

  
18 18
[app:main]
19
sqlalchemy.url=postgres://vigiboard:tandreja@localhost/vigiboard_test
19
#sqlalchemy.url=postgres://vigiboard:tandreja@localhost/vigiboard_test
20 20
#sqlalchemy.url=mysql://root:tandreja@localhost:3306/vigiboard_test
21
#sqlalchemy.url = sqlite:///:memory:
21
sqlalchemy.url = sqlite:///:memory:
22 22
use = config:development.ini
23 23

  
24 24
[app:main_without_authn]
vigiboard/tests/__init__.py
69 69
    # XXX This is a hack, some import gets there first.
70 70
    #environ.setdefault('VIGILO_SETTINGS_MODULE', 'settings_tests')
71 71
    # XXX hard-coded path.
72
    sys.argv[1:0] = ['--with-pylons', '../vigiboard/test.ini', 'vigiboard.tests' ]
72
    sys.argv[1:0] = ['--with-pylons', '../vigiboard/test.ini', 
73
                     '--with-coverage', '--cover-inclusive',
74
                     '--cover-erase', '--cover-package', 'vigiboard',
75
                     'vigiboard.tests' ]
73 76
    nose.main()
74 77

  

Also available in: Unified diff