NCAS-CMS / NCAS-CMS/cf-python

Explicit object representation testing

Open
#280 0 comments 1 reaction 1 assignee View on GitHub

@sadielbartholomew is already working on this.

Since Nov 24, 2021.

testing
Dominant language
Python
Stars
150
Forks
23
Avg merge
1d 11h
Merged PRs (30d)
2

Description

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).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.