tests.test_forge moduleΒΆ

Tests for the multi-forge metrics reader.

tests.test_forge.test_split_repo_url(url, expected)[source]ΒΆ

Check a repository URL splits into its host and its namespace path.

tests.test_forge.test_split_repo_url_rejects_incomplete(url)[source]ΒΆ

Check a URL without an owner and a name is refused rather than guessed.

tests.test_forge.test_canonical_url(subject, expected)[source]ΒΆ

Check every way of naming a subject lands on one spelling.

The store keys on this, so two configurations naming the same repository differently must not accrue two disjoint histories.

tests.test_forge.test_canonical_url_rejects_what_it_cannot_resolve(subject)[source]ΒΆ

Check a half-written subject raises rather than becoming a wrong URL.

tests.test_forge.test_forge_of_never_guesses_an_unknown_host()[source]ΒΆ

Check an undeclared host raises instead of sampling nothing.

A silently unsampled subject is worse than a loud one: it renders as a project nobody follows rather than as a project nobody could read.

tests.test_forge.test_forge_of_rejects_an_unimplemented_forge()[source]ΒΆ

Check a declared host naming software nothing reads is refused.

tests.test_forge.test_known_forges_are_implemented()[source]ΒΆ

Check every bundled host names a forge the reader actually speaks.

tests.test_forge.test_newest_dated(release, tag, expected)[source]ΒΆ

Check the more recent of a release and a tag wins, and says which it is.

tests.test_forge.test_readings_yield_only_registered_metrics()[source]ΒΆ

Check the reader and the metric registry cannot drift apart.

A reading yielded under an ID the registry does not know raises inside upsert, mid-collection, on the one code path nobody watches.

tests.test_forge.test_readings_omit_what_a_forge_did_not_answer()[source]ΒΆ

Check a project with no release yields no row rather than a blank one.

tests.test_forge.test_readings_leave_the_creation_date_to_the_sampler()[source]ΒΆ

Check created is not yielded as a metric of its own.

It is not a reading but the origin of one, recorded by the sampler as a zero-star reading on that date.

tests.test_forge.test_readings_default_a_missing_release_source()[source]ΒΆ

Check a release with no stated kind still records one.

The store’s consumers gate release-only rendering on this value, so an empty cell beside a real date would read as a project that never released.