Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Automatically use mysqld-ram server if available.
import sys
if sys.argv[1] == "test":
import psutil
def mysqld_ram_running():
return any('' in ' '.join(p.cmdline) for p in psutil.get_process_list())
if mysqld_ram_running():
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangotests',
'USER': 'tester',
'PASSWORD': 'password',
'HOST': '',
'PORT': '3307',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.