Skip to main content
===
Create tests from current behaviour
===
Imagine you have to refactor a large, undocumented (hence untested!) python code base.

This utility captures this functionality by generating test cases during test executions of the code. This assists refactoring as the current expected behaviour has been captured.

====
Why 'Astrotest'?
====

'Astroturfing' is a term meaning to create inauthentic comments or discussion to influence or overwhelm natural organic debate. Hence 'Astro-testing': it's not authentically TDD; it can create a large number of tests automatically.

====
Example
====

If the following function has the test_logging decorator::


@astro_test
def simplefn(a,b):
return a+b

and is called with:

simplefn(a=1,b=2)

it'll create a unit test file with the following (comments etc. omitted):

def test_simplefn(self):
self.assertEqual(simplefn(a=1, b=2), 3)

Release history Release notifications | RSS feed

This release

1.0.0 This release

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page