Skip to content

Commit

Permalink
docs: Fix a few typos
Browse files Browse the repository at this point in the history
There are small typos in:
- docs/database.rst
- docs/managing_python_path.rst
- tests/test_manage_py_scan.py

Fixes:
- Should read `implicitly` rather than `impliclity`.
- Should read `implicitly` rather than `implicilty`.
- Should read `explicitly` rather than `explictly`.
  • Loading branch information
timgates42 authored and bluetech committed Sep 22, 2021
1 parent cf6b229 commit 924c132
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ Populate the test database if you don't use transactional or live_server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you are using the :func:`pytest.mark.django_db` marker or :fixture:`db`
fixture, you probably don't want to explictly handle transactions in your
fixture, you probably don't want to explicitly handle transactions in your
tests. In this case, it is sufficient to populate your database only
once. You can put code like this in ``conftest.py``::

Expand Down
2 changes: 1 addition & 1 deletion docs/managing_python_path.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Managing the Python path

pytest needs to be able to import the code in your project. Normally, when
interacting with Django code, the interaction happens via ``manage.py``, which
will implicilty add that directory to the Python path.
will implicitly add that directory to the Python path.

However, when Python is started via the ``pytest`` command, some extra care is
needed to have the Python path setup properly. There are two ways to handle
Expand Down
4 changes: 2 additions & 2 deletions tests/test_manage_py_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
@pytest.mark.django_project(project_root="django_project_root", create_manage_py=True)
def test_django_project_found(django_testdir) -> None:
# XXX: Important: Do not chdir() to django_project_root since runpytest_subprocess
# will call "python /path/to/pytest.py", which will impliclity add cwd to
# will call "python /path/to/pytest.py", which will implicitly add cwd to
# the path. By instead calling "python /path/to/pytest.py
# django_project_root", we avoid impliclity adding the project to sys.path
# django_project_root", we avoid implicitly adding the project to sys.path
# This matches the behaviour when pytest is called directly as an
# executable (cwd is not added to the Python path)

Expand Down

0 comments on commit 924c132

Please sign in to comment.