You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/diff.rst
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,3 +2,11 @@
2
2
3
3
The Diff Command
4
4
----------------
5
+
6
+
The plugin can backup the test results for you if you pass the ``--django-backup-queries [BACKUP_PATH]`` parameter to it. It will create a backup to ``.pytest-query.old`` by default if previous results were found.
7
+
8
+
.. warning::
9
+
10
+
Bear in mind that it will override any existing backup file in the provided or default path.
11
+
12
+
After running ``pytest --django-backup-queries``, you can run ``django-queries diff`` to show the changes. Make sure you actually had previous results, otherwise it will have nothing to compare.
3. Then use ``django-queries show`` to show the results directly into your console:
32
+
3. Run ``pytest``;
33
+
4. Then use ``django-queries show`` to show the results directly into your console:
33
34
34
35
.. code-block:: text
35
36
@@ -53,13 +54,13 @@ Quick Start
53
54
| module3 | |
54
55
+---------+-------------------------+
55
56
56
-
4. Or for a nicer presentation, use ``django-queries html > results.html`` to export the results as HTML. See `this example <./html_export_results.html>`_ for a demo!
57
+
5. Or for a nicer presentation, use ``django-queries html > results.html`` to export the results as HTML. See `this example <./html_export_results.html>`_ for a demo!
57
58
58
59
.. image:: _static/html_export_results.png
59
60
:width:500 px
60
61
:align:center
61
62
62
-
5. By running it twice with the option described :ref:`here <diff_usage>` and by running ``django-queries diff`` you will get something like this:
63
+
6. By running it twice with the option described :ref:`here <diff_usage>` and by running ``django-queries diff`` you will get something like this:
0 commit comments