-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBCAAGBQJUhMdyAAoJEC0ft5FqUuEhQrkQAKEriNYM8ka1jh8LPiNQKfJh
Im7cnM0QxPIL9L91i0FobybaNKY6v2cMa5fxtnNb4o9glUTpt0USPZn5hmlts9+d
jyYWcMdf6A46omtH3ypYAPXdKmY0uFdBktDpkvTqDtpIjT+5GIvfrtiQgHNzCJtg
laozeyu9+wKW4ptwgBabOGO488nAB5/jaS2O3+4RaUOzmVjW159VhBrFmETXme4D
xxDNYY4jZHmGiAW2OyOj1QJXaTuXMAfARKUdEP76vrAuOl80haR3gp7CN5VJfUOd
xB3UJ77zFpYFXvjIa2EhKZQibu79nWHOYHiK14P6qBXityB8L6q8CAt/RwuDwfjQ
RSRD2RavH8+wg1rxvg0Hn/mbK9jfsNuRkR76iWkLinG92v94nTjiT+lSvWXKpWPl
46T1nDAtYDt53/I39Q8JOQePPyUc1VcrWzKSseASqKAr1BhARyPIe1I2Wge7rcXz
KxKaLoCMLK3FIsgZvSMBwoeimTRyyUiObZ1O/iAk86RlNYZGQ4jprhmzxyeXnvdD
M7GDKfEimyl2/8Zzh7jHxfxn937MzAjHflT/ks7UU/Y1AIKp8knXJls4nNAeUg3F
KUqgvKnDbHIdHus0zvB9AprqnPuh4yURyZhymlI6knBHrd37ppEwcPPT5ob1QIJZ
vs/drhqx2V4iRYme11jt
=kxdl
-----END PGP SIGNATURE-----
On 12/07/2014 12:59 PM, Matwey V. Kornilov wrote:
> The following code works perfect for me, why the code in the
> documentations so sophisticated?
>
> def runtests():
> os.environ.setdefault("DJANGO_SETTINGS_MODULE",
> "tests.test_settings")
>
> try:
> from django import setup
> setup()
> except ImportError:
> pass
> from django.core.management import call_command
>
> call_command("test","tests.__init__")
>
> if __name__ == "__main__":
> runtests()
Sure, that works too. I don't think it's significantly simpler than the
documented version, and it's less flexible if you want to customize test
running further.
Carl
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5484C772.5040505%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment