##// END OF EJS Templates
docs: Update notes regarding Pylons / Pyramid
johbo -
r739:3f65f91e default
parent child Browse files
Show More
@@ -1,58 +1,66 b''
1
1
2 .. _test-unit-and-functional:
2 .. _test-unit-and-functional:
3
3
4 ===========================
4 ===========================
5 Unit and Functional Tests
5 Unit and Functional Tests
6 ===========================
6 ===========================
7
7
8
8
9
9
10 py.test based test suite
10 py.test based test suite
11 ========================
11 ========================
12
12
13
13
14 The test suite is in the folder :file:`rhodecode/tests/` and should be run with
14 The test suite is in the folder :file:`rhodecode/tests/` and should be run with
15 the test runner `py.test` inside of your `nix-shell` environment::
15 the test runner `py.test` inside of your `nix-shell` environment::
16
16
17 py.test rhodecode
17 py.test rhodecode
18
18
19
19
20
20
21 py.test integration
21 py.test integration
22 -------------------
22 -------------------
23
23
24 The integration with the test runner is based on the following three parts:
24 The integration with the test runner is based on the following three parts:
25
25
26 - `pytest_pylons` is a py.test plugin which does the integration with the
26 - :file:`rhodecode/tests/pylons_plugin.py` is a py.test plugin which does the
27 Pylons web framework. It sets up the Pylons environment based on the given ini
27 integration with the Pylons web framework. It sets up the Pylons environment
28 file.
28 based on the given ini file.
29
29
30 Tests which depend on the Pylons environment to be set up must request the
30 Tests which depend on the Pylons environment to be set up must request the
31 fixture `pylonsapp`.
31 fixture `pylonsapp`.
32
32
33 - :file:`rhodecode/tests/plugin.py` contains the integration of py.test with
33 - :file:`rhodecode/tests/plugin.py` contains the integration of py.test with
34 RhodeCode Enterprise itself.
34 RhodeCode Enterprise itself and it takes care of setting up the needed parts
35 of the Pyramid framework.
35
36
36 - :file:`conftest.py` plugins are used to provide a special integration for
37 - :file:`conftest.py` plugins are used to provide a special integration for
37 certain groups of tests based on the directory location.
38 certain groups of tests based on the directory location.
38
39
39
40
41 .. note::
42
43 We are migrating from Pylons to its successor Pyramid. Eventually the role of
44 the file `pylons_plugin.py` will change to provide only a Pyramid
45 integration.
46
47
40
48
41 VCS backend selection
49 VCS backend selection
42 ---------------------
50 ---------------------
43
51
44 The py.test integration provides a parameter `--backends`. It will skip all
52 The py.test integration provides a parameter `--backends`. It will skip all
45 tests which are marked for other backends.
53 tests which are marked for other backends.
46
54
47 To run only Subversion tests::
55 To run only Subversion tests::
48
56
49 py.test rhodecode --backends=svn
57 py.test rhodecode --backends=svn
50
58
51
59
52
60
53 Frontend / Styling support
61 Frontend / Styling support
54 ==========================
62 ==========================
55
63
56 All relevant style components have an example inside of the "Style" section
64 All relevant style components have an example inside of the "Style" section
57 within the application. Enable the setting `debug_style` to make this section
65 within the application. Enable the setting `debug_style` to make this section
58 visible in your local instance of the application.
66 visible in your local instance of the application.
General Comments 0
You need to be logged in to leave comments. Login now