
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
django-juno-testrunner
Advanced tools
A more useful (and slightly more glamorous) test runner for Django 1.6+ from the folks at YunoJuno
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
.. image:: https://travis-ci.org/yunojuno/django-juno-testrunner.svg?branch=master
:target: https://travis-ci.org/yunojuno/django-juno-testrunner
This is a drop-in test-runner alternative for Django 1.6+ which takes DiscoverRunner and adds the following:
The Python package you get, if you're interested, is called junorunner
. That's because it came from the YunoJuno codebase <https://www.yunojuno.com/changelog/>
_, and we'd put all of our pun skills into copy for the site, so we played it safe this time.
To get it from PyPi et al::
$ pip install django-juno-testrunner
If you want the bleeding-edge version from GitHub::
$ pip install -e git+ssh://git@github.com/YunoJuno/django-juno-testrunner.git#egg=django-juno-testrunner
Downloading the package's source and installing it yourself is also an option.
Once downloaded, run::
$ python setup.py
But you knew that already, yep?
django-juno-testrunner
has one automatically installed dependency, the delightful colorama <https://pypi.python.org/pypi/colorama>
_.
Update your settings.py
to use this test runner::
TEST_RUNNER = 'junorunner.testrunner.TestSuiteRunner'
Set some options, if you want.
By default, junorunner
will show you test errors and failures as they happen, inline in the test output, so you can ponder them while waiting for the rest of the suite to run. You can disable this, of course::
TEST_RUNNER_IMMEDIATELY_SHOW_FAILS = False
Also by default, junorunner
puts the traceback from all test failures and errors in a file called 'test_failures.txt' in the project root. Alongside that is a file with the name of each failed test in full dot-separated syntax, one test per line, to make it easier to re-run just your failed tests (more on that later). If you don't like the default names, go to town with your own choices::
TEST_RUNNER_RERUN_LOG_FILE_NAME = 'must_try_harder.txt'
TEST_RUNNER_FAILURE_LIST_FILENAME = 'post_mortem.txt'
That's it.
Running tests '''''''''''''
junorunner
will replace the default Django 1.6+ DiscoverRunner so run your tests as 'normal', whether that's via a straight ./manage.py test
or Fabric or some big red button and an Arduino, as long as manage.py test
is ultimately called, it's all good.
You'll get the most informative in-flight output with --verbosity=2
.
When your test run is over, you'll get the usual detailed failure and error output, if any, plus there'll be the failures list (default name test_failures.txt
) and the rerun log (test_rerun.txt
) in your project directory. If all your tests passed, these files will still exist, but will be empty.
Note that as soon as you start a new test run (even if you then Ctrl-C it to death or use an axe to cut the power cable), the contents of those files will be immediately zapped.
Using the rerun log '''''''''''''''''''
If you're not sure how to to pump the dot-separated failed tests back into the test client, you can do this way::
$ ./manage.py test $(cat test_rerun.txt) # POSIX
or ::
$ ./manage.py test $(< test_rerun.txt) # bash
Generating JUnit compatible XML '''''''''''''''''''''''''''''''
If you are running your tests in an environment that can process JUnit XML files (e.g. in Jenkins), you may want to set TEST_RUNNER_JUNIT_XML
::
TEST_RUNNER_JUNIT_XML = os.path.join(BASE_DIR, 'junit.xml')
Contributions and bug reports are welcome. Pull requests adding jazzy new features are even more welcome.
Thanks to:
FAQs
A more useful (and slightly more glamorous) test runner for Django 1.6+ from the folks at YunoJuno
We found that django-juno-testrunner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.