Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Shortcut to *tests*. 

5""" 

6 

7from .qcms import simple_french_qcm, ml_french_qcm, simple_cinema_qcm 

8 

9 

10def get_game(name): 

11 """ 

12 Retrieves a game. 

13 

14 @param name game name 

15 @return game 

16 """ 

17 if name in ("test_qcm1", "simple_french_qcm"): 

18 return simple_french_qcm() 

19 if name in ("test_qcm2", "simple_cinema_qcm"): 

20 return simple_cinema_qcm() 

21 if name in ("test_ml1", "ml_french_qcm"): 

22 return ml_french_qcm() 

23 raise ValueError( # pragma: no cover 

24 "Unknown game '{0}'".format(name))