Yeah, I got you..
My concern is on the documentation, the way it has provided the commands
for executing test cases.

That
path.to.settings seems confusing sometimes..

On Fri, 17 Mar, 2023, 1:20 am Bhuvnesh Sharma, <bhuvnesh...@gmail.com>
wrote:

> We can run django tests with custom settings by using --settings flag and
> providing the path to the custom settings file . For example:
> ./runtests.py --settings=new_app.test_settings
>
> What do you want to do exactly?
>
> On Fri, Mar 17, 2023 at 1:00 AM Ayush Bisht <bisht.ayush2...@gmail.com>
> wrote:
>
>> Seems like, it is for defining how actually we are selecting the specific
>> test case. It is very confusing at first.
>> Can't we just explain it with an example..
>>
>> On Friday, March 17, 2023 at 12:54:27 AM UTC+5:30 Ayush Bisht wrote:
>>
>>> * ./runtests.py --settings=path.to.settings i18n.tests.TranslationTests*
>>>
>>> what exactly is the purpose of *path.to.settings,* I'm getting an error
>>> while running the above line.
>>> Can anyone please explain?
>>>
>>> *Error*
>>> Testing against Django installed in '/home/ayush/OS/django/django' with
>>> up to 8 processes
>>> Traceback (most recent call last):
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 770, in <module>
>>>     failures = django_tests(
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 398, in
>>> django_tests
>>>     test_labels, state = setup_run_tests(*process_setup_args)
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 300, in
>>> setup_run_tests
>>>     test_modules, state = setup_collect_tests(
>>>   File "/home/ayush/OS/django/tests/./runtests.py", line 201, in
>>> setup_collect_tests
>>>     "INSTALLED_APPS": settings.INSTALLED_APPS,
>>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 84, in
>>> __getattr__
>>>     self._setup(name)
>>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 71, in
>>> _setup
>>>     self._wrapped = Settings(settings_module)
>>>   File "/home/ayush/OS/django/django/conf/__init__.py", line 185, in
>>> __init__
>>>     mod = importlib.import_module(self.SETTINGS_MODULE)
>>>   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in
>>> import_module
>>>     return _bootstrap._gcd_import(name[level:], package, level)
>>>   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
>>>   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
>>>   File "<frozen importlib._bootstrap>", line 992, in
>>> _find_and_load_unlocked
>>>   File "<frozen importlib._bootstrap>", line 241, in
>>> _call_with_frames_removed
>>>   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
>>>   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
>>>   File "<frozen importlib._bootstrap>", line 992, in
>>> _find_and_load_unlocked
>>>   File "<frozen importlib._bootstrap>", line 241, in
>>> _call_with_frames_removed
>>>   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
>>>   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
>>>   File "<frozen importlib._bootstrap>", line 1004, in
>>> _find_and_load_unlocked
>>> ModuleNotFoundError: No module named 'path'
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/dd827ca8-704e-4ffc-8d7a-2c56d100cdd7n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/dd827ca8-704e-4ffc-8d7a-2c56d100cdd7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BZJHEqMWEj8dE9gpVW0f5QajXy1b9GPp-Qur4457GMoWAoUbQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BZJHEqMWEj8dE9gpVW0f5QajXy1b9GPp-Qur4457GMoWAoUbQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%2BM4H5-M%2B6T5PvfctNYJR7o0ebry_4f-JUGec8QewJs%2BhASNg%40mail.gmail.com.

Reply via email to