Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest migration for unit.common.metadata.test_AncillaryVariableMetadata #5854

Conversation

bjlittle
Copy link
Member

🚀 Pull Request

Description


Consult Iris pull request check list


Add any of the below labels to trigger actions on this PR:

  • benchmark_this Request that this pull request be benchmarked to check if it introduces performance shifts

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.74%. Comparing base (2e18ae8) to head (3deb01a).
Report is 12 commits behind head on FEATURE_pytest_conversion.

❗ Current head 3deb01a differs from pull request most recent head abfc7ee. Consider uploading reports for the commit abfc7ee to get more accurate results

Additional details and impacted files
@@                      Coverage Diff                      @@
##           FEATURE_pytest_conversion    #5854      +/-   ##
=============================================================
- Coverage                      89.74%   89.74%   -0.01%     
=============================================================
  Files                             92       92              
  Lines                          22940    22940              
  Branches                        5462     5462              
=============================================================
- Hits                           20588    20587       -1     
- Misses                          1620     1621       +1     
  Partials                         732      732              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bjlittle bjlittle force-pushed the pytest-common-metadata-ancillary-variable branch from 54c0ade to 3deb01a Compare March 18, 2024 15:34
Copy link
Member

@pp-mo pp-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more tiny style suggestions

self.cls = AncillaryVariableMetadata

def test_wraps_docstring(self):
self.assertEqual(BaseMetadata.__eq__.__doc__, self.cls.__eq__.__doc__)
assert BaseMetadata.__eq__.__doc__ == self.cls.__eq__.__doc__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this check would be less confusing the other way around

self.cls = AncillaryVariableMetadata
self.none = self.cls(*(None,) * len(self.cls._fields))

def test_wraps_docstring(self):
self.assertEqual(BaseMetadata.combine.__doc__, self.cls.combine.__doc__)
assert BaseMetadata.combine.__doc__ == self.cls.combine.__doc__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above -- other way round ?

self.cls = AncillaryVariableMetadata
self.none = self.cls(*(None,) * len(self.cls._fields))

def test_wraps_docstring(self):
self.assertEqual(BaseMetadata.difference.__doc__, self.cls.difference.__doc__)
assert BaseMetadata.difference.__doc__ == self.cls.difference.__doc__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another for the other-way-round

self.cls = AncillaryVariableMetadata
self.none = self.cls(*(None,) * len(self.cls._fields))

def test_wraps_docstring(self):
self.assertEqual(BaseMetadata.equal.__doc__, self.cls.equal.__doc__)
assert BaseMetadata.equal.__doc__ == self.cls.equal.__doc__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other way round

@bjlittle bjlittle force-pushed the pytest-common-metadata-ancillary-variable branch from eb21150 to abfc7ee Compare March 19, 2024 15:53
@pp-mo pp-mo merged commit 0c36ec8 into SciTools:FEATURE_pytest_conversion Mar 20, 2024
18 checks passed
@bjlittle bjlittle deleted the pytest-common-metadata-ancillary-variable branch March 20, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: pytest Type: Feature Branch Highlight this for a feature branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants