Automated tests at package build time
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi devs,

    https://wiki.debian.org/DjangoPackagingDraft says that auto tests can be run like so:
    cd {build_dir}; django-admin test --settings=YOURMODULE.test_settings --pythonpath=. [YOURMODULE.tests]
    Where YOURMODULE is the top-level dir which contains a specific Django settings named test_settings.py and contains a tests/ subdir for the auto tests to pass.

    Would this be appropriate for Booktype? I can't find values for --settings and --pythonpath that will work on my build machine.

    Cheers!

    Daniel
  • 1 Comment sorted by
  • Hi Daniel!

    If you check source repository you will notice "tests" directory. In this directory we have 3 needed config + other files for the test projects.

    You will notice there are 3 shell scripts. start_tests.py, start_functests.sh and start_seleniumtests.sh. Each type of tests has different settings file and manage.py which defines PATH, settings file name and etc.You would probably be interested in everything except selenium tests. You can use settings file from there and use pythonpath values defined in manage.py and func_manage.py.


    Aco