Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: corrects test for non-existent attribute#1395

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chalmerlowe merged 4 commits intomainfromupdate-attribute-test
Nov 2, 2022

Conversation

@chalmerlowe
Copy link
Collaborator

A test was failing because we were attempting to access an attribute that does not exist (NOTE it is not supposed to exist for this test).

Our test was supposed to detect that the failing attribute did not exist by using anassertIsNone() test method, when we should have been asserting that the attribute does not exist, because within theassertIsNone() method, if the attribute does not exist when you call it, it raises anAttributeError instead of returningNone.

@product-auto-labelproduct-auto-labelbot added size: xsPull request size is extra small. api: bigqueryIssues related to the googleapis/python-bigquery API. labelsOct 31, 2022
@product-auto-labelproduct-auto-labelbot added size: sPull request size is small. and removed size: xsPull request size is extra small. labelsNov 1, 2022
self.assertEqual(len(df),0)# verify the number of rows
self.assertIsNone(df.crs)
ifversion_info.major==3andversion_info.minor>7:
assertnothasattr(df,"crs")# used with Python == 3.7
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these comments swapped?

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

Looks like it.
Sigh.

Will go fix.

@chalmerlowechalmerlowe marked this pull request as ready for reviewNovember 2, 2022 12:29
@chalmerlowechalmerlowe requested a review froma teamNovember 2, 2022 12:29
@chalmerlowechalmerlowe requested review froma team ascode ownersNovember 2, 2022 12:29
@chalmerlowechalmerlowe merged commita80f436 intomainNov 2, 2022
@chalmerlowechalmerlowe deleted the update-attribute-test branchNovember 2, 2022 14:36
@release-pleaserelease-pleasebot mentioned this pull requestNov 2, 2022
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull requestApr 17, 2023
* fix: corrects test for non-existent attribute* updates import statement to fix linting issue* updates a test to check for Python version* updates comments
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast approved these changes

@partheapartheaparthea approved these changes

@engelkeengelkeAwaiting requested review from engelkeengelke is a code owner automatically assigned from googleapis/python-samples-owners

Assignees

No one assigned

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: sPull request size is small.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@chalmerlowe@tswast@parthea

[8]ページ先頭

©2009-2025 Movatter.jp