NCAS-CMS / NCAS-CMS/cf-python

Explicit object representation testing

Offen
#280 0 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@sadielbartholomew arbeitet bereits daran.

Seit 24.11.2021.

testing
Vorherrschende Sprache
Python
Sterne
150
Forks
23
Ø Merge
1 T. 11 Std.
Gemergte PRs (30 T.)
2

Beschreibung

Our test suite currently tests for most (but not all) core cf objects that the inspection (__repr__, __str__ and in cases where applicable, dump) methods don't error, without going further and checking that they give the desired output explicitly, typically something close to this:

https://github.com/NCAS-CMS/cf-python/blob/63ffeae84c2d9e479d52b499c60b910cc99e75c6/cf/test/test_AuxiliaryCoordinate.py#L56-L60

It would be nice, ideally, to test that the outputs are correct and exactly as they should be, to capture representation issues and typos such as that raised in #279 (which I fixed without adding a dedicated test to capture it because most, if not all, of our representation tests lack such an explicit test and it would be best to get such tests all added as a batch, I think).

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.