1
1
Development
2
2
===========
3
3
4
- To contribute to `pytest-html ` you can use `Pipenv `_ to manage a python virtual environment and
4
+ To contribute to `pytest-html ` you can use `Hatch `_ to manage a python virtual environment and
5
5
`pre-commit `_ to help you with styling and formatting.
6
6
7
7
To setup the virtual environment and pre-commit, run:
8
8
9
9
.. code-block :: bash
10
10
11
- $ pipenv install --dev
12
- $ pipenv run pre-commit install
11
+ $ hatch -e test run pre-commit install
13
12
14
- If you're not using `Pipenv `_, run the following to install `pre-commit `_:
13
+ If you're not using `Hatch `_, run the following to install `pre-commit `_:
15
14
16
15
.. code-block :: bash
17
16
@@ -35,14 +34,31 @@ Running Tests
35
34
Python
36
35
~~~~~~
37
36
38
- You will need `Tox `_ installed to run the tests against the supported Python versions. If you're using `Pipenv `_
37
+ You will need `Tox `_ and ` Docker `_ installed to run the tests against the supported Python versions. If you're using `Hatch `_
39
38
it will be installed for you.
40
39
41
- With `Pipenv `_, run:
40
+ The integration tests requires `Docker `_ as we have to render the report.
41
+ This is then done using `Selenium `_ and `BeautifulSoup `_
42
+
43
+ To start the image needed, run:
44
+
45
+ .. code-block :: bash
46
+
47
+ $ ./start
48
+
49
+ Sometimes the image becomes unresponsive and needs a restart:
50
+
51
+ .. code-block :: bash
52
+
53
+ $ ./start down && ./start
54
+
55
+ You can watch the tests in your browser at `localhost:7900 `, the password is `secret `.
56
+
57
+ To run the tests with `Hatch `_, run:
42
58
43
59
.. code-block :: bash
44
60
45
- $ pipenv run tox
61
+ $ hatch -e test run tox
46
62
47
63
Otherwise, to install and run, do:
48
64
@@ -54,7 +70,7 @@ Otherwise, to install and run, do:
54
70
JavaScript
55
71
~~~~~~~~~~
56
72
57
- You will need `npm `_ installed to run the JavaScript tests. Internally, we use `Grunt `_ and ` QUnit `_ to run the tests.
73
+ You will need `npm `_ installed to run the JavaScript tests. Internally, we use `Mocha `_, ` Chai `_, ` Sinon `_ to run the tests.
58
74
59
75
Once `npm `_ is installed, you can install all needed dependencies by running:
60
76
@@ -66,7 +82,7 @@ Run the following to execute the tests:
66
82
67
83
.. code-block :: bash
68
84
69
- $ npm test
85
+ $ npm run unit
70
86
71
87
Documentation
72
88
-------------
@@ -110,18 +126,22 @@ Follow these steps to release a new version of the project:
110
126
#. Commit and push the new branch and then create a new pull request
111
127
#. Wait for tests and reviews and then merge the branch
112
128
#. Once merged, update your local master again (``git pull --rebase upstream master ``)
113
- #. Tag the release with the new release version (``git tag v <new tag> ``)
129
+ #. Tag the release with the new release version (``git tag <new tag> ``)
114
130
#. Push the tag (``git push upstream --tags ``)
115
131
#. Done. Check `Github Actions `_ for release progress.
116
132
117
133
.. _GitHub Actions : https://github.com/pytest-dev/pytest-html/actions
118
- .. _ Grunt : https://gruntjs.com
134
+ .. _ Mocha : https://mochajs.org/
119
135
.. _npm : https://www.npmjs.com
120
- .. _ Pipenv : https://pipenv .pypa.io/en/ latest
136
+ .. _ Hatch : https://hatch .pypa.io/latest/
121
137
.. _pre-commit : https://pre-commit.com
122
- .. _QUnit : https://qunitjs.com
138
+ .. _Chai : https://www.chaijs.com/
139
+ .. _Sinon : https://sinonjs.org/
123
140
.. _Read The Docs : https://readthedocs.com
124
141
.. _RST : https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
125
142
.. _SASS/SCSS : https://sass-lang.com
126
143
.. _the changelog : https://pytest-html.readthedocs.io/en/latest/changelog.html
127
144
.. _Tox : https://tox.readthedocs.io
145
+ .. _Docker : https://www.docker.com/
146
+ .. _Selenium : https://www.selenium.dev/
147
+ .. _BeautifulSoup : https://beautiful-soup-4.readthedocs.io/en/latest/
0 commit comments