Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This is literally an exact clone of unittest (from Python 2.7), but with colors.
This is literally an exact clone of unittest (from Python 2.7), but with colors. (Now also compatible with Python 3!)
You literally use it in the exact same way as unittest.
You can just install it into your path or your sourced virtual environment with this extremely easy command:
pip install redgreenunittest
After that, just reference this package like a normal, regular old python package like this:
import redgreenunittest
If you do want to use it as a direct replacement for unittest without doing any extra work, you can just import like this:
import redgreenunittest as unittest
I assume you mean the Python framework. (Not that movie.) Remember when I said, "exact clone" before? I lied. There is one extra directory called "django" in there that contains a file called "simple.py"
If you want to use this as your test runner, and you're already using unittest, you can literally drop this line of code into your settings.py file, and it will straight up work if you followed those installation instructions. In fact you could even skip the referencing step since Python is smart.
TEST_RUNNER="redgreenunittest.django.runner.RedGreenDiscoverRunner"
Go ahead. Run your tests. Colors. It's like we live in the future.
Running a Django version pre-1.6? Then you'll want the simple runner.
TEST_RUNNER="redgreenunittest.django.simple.RedGreenTestSuiteRunner"
Ok, so if you're using a vim gui like MacVim or GVim and its shell to run your tests, they're going to look super weird. Sorry. You're boned for colors in that shell. You can use conque if you want. I made it work using zsh and oh-my-zsh and some medium-level vim scripting.
The reason it sucks is because $TERM
is set to dumb
in the vim gui shell (literally). So if you're using any other shell where $TERM
is set to dumb
, you're also going to be boned in that case.
You may be boned in other scenarios. My experience in this area is limited. Let me know if you find yourself boned in other situations. I may be able to help, or I can at least make a note in this README.
FAQs
This is literally an exact clone of unittest (from Python 2.7), but with colors.
We found that redgreenunittest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.