Skip to main content

Inelegant, a directory of weird helpers for tests.

Project description

“Inelegant” is a set of not very elegant tools to help testing. So far

there are five packages: the most important tools are the waiter functions. will block until a port in a host is not accepting connections anymore, and will block until a port in the host will be ready for receiving data. There is also, that sets up a very dumb SocketServer.TCPServer subclass for testing.

inelegant.finder: contains the inelegant.finder.TestFinder class. It is a unittest.TestSuite subclass that makes the task of finding test cases and doctests way less annoying.

inelegant.module: with inelegant.module.create_module(), one can create fully importable Python modules. inelegant.module.installed_module() will create and remove the importable module. There are other related functions.

inelegant.process: home of inelegant.process.Process, a nice multiprocessing.Process subclass that makes the process of starting, stopping and communicating with a function in another process easier enough.

inelegant.fs: tools for file system operations. Most notably, context managers to make such operations reverted. So, now once can “cd” into a directory and be back to the original one, create a temporary file and have it automatically deleted after the context, and the same with temporary directories.

For more info, check the project page.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inelegant-0.0.8.tar.gz (25.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page