testing.common.database
utilities for testing.* packages
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release October 2017, last commit December 2021) and receives no maintenance or security updates. While it has low install friction and permissive licensing, it is a template library requiring substantial subclassing work, and there is no active support or modern alternatives documented. Use only if you are maintaining legacy code already depending on it; for new projects, evaluate actively maintained testing frameworks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- You must implement abstract methods (initialize, get_data_directory, get_server_commandline, is_server_available) in your subclass; the base class is a template, not a ready-to-use tool.
- Low install friction with no runtime dependencies.
- However, the package is abandoned—last release was 2017-10-23 and last commit 2021-12-18—so it receives no active maintenance or security updates.
License · maintenance · safety
Apache License 2.0 (permissive) — Licensed under Apache License 2.0 (permissive), so you may use, modify, and distribute it freely in commercial and private projects with minimal restrictions.
last release 2017-10-23 (3217 days) · last repo commit 2021-12-18 · 6 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,507,297 downloads/mo, #2,290 on PyPI
Alternatives
Verify before relying
pip install testing.common.database
from testing.common.database import Database, DatabaseFactory
class MyDatabase(Database):
def initialize(self):
pass
def get_data_directory(self):
return '/path/to/data'
def get_server_commandline(self):
return ['mydb', '--port', str(self.settings['port'])]- Whether the package works reliably with Python versions beyond 3.6 (classifiers list only up to 3.6; current Python is much newer).
- Whether subprocess-based database spawning (used since 2.0.0) is stable on modern operating systems.
- Real-world usage patterns and whether the caching and factory features work as documented in practice.
What it is and what it does
testing.common.database is a base-class library for building database testing frameworks. It provides a Database class that you subclass to define how to initialize, start, and check the health of a temporary database instance, plus a DatabaseFactory for managing multiple instances and caching initialized databases across test runs. It also includes utility decorators to skip tests when a database command is not found, and helpers like get_unused_port() and get_path_of() for locating free ports and executables.
The package is designed to be inherited and extended, not used directly. You implement hooks like initialize_database(), get_server_commandline(), and is_server_available() to teach it how to manage your specific database. Once subclassed, you can use it as a context manager to spin up isolated database instances for each test, optionally caching the initialized state to avoid repeated setup overhead.
Use it for
- Build a PostgreSQL testing framework by subclassing Database and implementing database-specific initialization and server-launch logic.
- Create a test suite that spawns temporary database instances on unused ports, avoiding conflicts between parallel test runs.
- Cache an initialized database schema across multiple tests to reduce per-test setup time while maintaining isolation.
- Skip database-dependent tests when the database server executable is not found on the system.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release October 2017, last commit December 2021) and receives no maintenance or security updates. While it has low install friction and permissive licensing, it is a template library requiring substantial subclassing work, and there is no active support or modern alternatives documented. Use only if you are maintaining legacy code already depending on it; for new projects, evaluate actively maintained testing frameworks.
Install
testing-common-database on PyPI
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2017-10-23 and last commit 2021-12-18—so it receives no active maintenance or security updates.
You must implement abstract methods (initialize, get_data_directory, get_server_commandline, is_server_available) in your subclass; the base class is a template, not a ready-to-use tool.
License in practice
Licensed under Apache License 2.0 (permissive), so you may use, modify, and distribute it freely in commercial and private projects with minimal restrictions.
Quickstart
pip install testing.common.database
from testing.common.database import Database, DatabaseFactory
class MyDatabase(Database):
def initialize(self):
pass
def get_data_directory(self):
return '/path/to/data'
def get_server_commandline(self):
return ['mydb', '--port', str(self.settings['port'])]
Verify before relying
- Whether the package works reliably with Python versions beyond 3.6 (classifiers list only up to 3.6; current Python is much newer).
- Whether subprocess-based database spawning (used since 2.0.0) is stable on modern operating systems.
- Real-world usage patterns and whether the caching and factory features work as documented in practice.
Package facts
| License | Apache License 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,217 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,507,297 / month, #2,290 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: DatabaseTopic :: Software DevelopmentTopic :: Software Development :: Testing |
Evidence: testing.common.database-2.0.3-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “database testing utilities”
- testing.common.databaseProvides base classes and utilities for building database testing…
- testing.postgresqlAutomatically creates and tears down temporary PostgreSQL instances…
- django-mock-queriesMocks Django QuerySet operations in memory for unit testing,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also testing.postgresql · pytest-pgsql · testgres · pytest-postgresql · async-factory-boy · pytest-databases · py-pglite · pytest-datadir · testcontainers-postgres · lamindb_setup