File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ Populate the test database if you don't use transactional or live_server
386386~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
387387
388388If you are using the :func: `pytest.mark.django_db ` marker or :fixture: `db `
389- fixture, you probably don't want to explictly handle transactions in your
389+ fixture, you probably don't want to explicitly handle transactions in your
390390tests. In this case, it is sufficient to populate your database only
391391once. You can put code like this in ``conftest.py ``::
392392
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Managing the Python path
55
66pytest needs to be able to import the code in your project. Normally, when
77interacting with Django code, the interaction happens via ``manage.py ``, which
8- will implicilty add that directory to the Python path.
8+ will implicitly add that directory to the Python path.
99
1010However, when Python is started via the ``pytest `` command, some extra care is
1111needed to have the Python path setup properly. There are two ways to handle
Original file line number Diff line number Diff line change 44@pytest .mark .django_project (project_root = "django_project_root" , create_manage_py = True )
55def test_django_project_found (django_testdir ) -> None :
66 # XXX: Important: Do not chdir() to django_project_root since runpytest_subprocess
7- # will call "python /path/to/pytest.py", which will impliclity add cwd to
7+ # will call "python /path/to/pytest.py", which will implicitly add cwd to
88 # the path. By instead calling "python /path/to/pytest.py
9- # django_project_root", we avoid impliclity adding the project to sys.path
9+ # django_project_root", we avoid implicitly adding the project to sys.path
1010 # This matches the behaviour when pytest is called directly as an
1111 # executable (cwd is not added to the Python path)
1212
You can’t perform that action at this time.
0 commit comments