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 invalid assert.throws statements#419

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

Conversation

igonro
Copy link
Contributor

@igonroigonro commentedMar 8, 2022
edited
Loading

Closes#416.

  • Fix invalidassert.throws statements
  • Run the tests again and check that the tests passed

To review:@risenW@steveoni

@igonro
Copy link
ContributorAuthor

After fixing the invalidassert.throws, some of the node tests are not passing. This is the output:

  707 passing (965ms)  2 failing  1) DataFrame       addColumn         throw error for wrong column length:      AssertionError: expected [Function] to throw error including 'ParamError: Column data length mismatch. You provided data with length 3 but Ndframe has column of length 4' but got 'ParamError: Column data length mismatch. You provided data with length 3 but Ndframe has column of length 3'      + expected - actual      -ParamError: Column data length mismatch. You provided data with length 3 but Ndframe has column of length 3      +ParamError: Column data length mismatch. You provided data with length 3 but Ndframe has column of length 4      at Context.<anonymous> (test/core/frame.test.ts:131:20)      at processImmediate (internal/timers.js:464:21)  2) Generic (NDFrame)       NDframe Created from Array         Throws error on duplicate index:      AssertionError: expected [Function] to throw error including 'IndexError: Row index must contain unique values' but got 'IndexError: You provided an index of length 3 but Ndframe rows has length of 2'      + expected - actual      -IndexError: You provided an index of length 3 but Ndframe rows has length of 2      +IndexError: Row index must contain unique values      at Context.<anonymous> (test/core/generic.test.ts:72:20)      at processImmediate (internal/timers.js:464:21)

@igonro
Copy link
ContributorAuthor

The same happens for some browser tests:

Chrome Headless 98.0.4758.102 (Linux x86_64) DataFrame addColumn throw error for wrong column length FAILED        AssertionError: expected [Function] to throw error including 'ParamError: Column data length mismatch. You provided data with length 3 but Ndframe has column of length 4' but got 'ParamError: Column data length mismatch. You provided data with length 3 but Ndframe has column of length 3'            at Context.<anonymous> (/tmp/7ad0f53a5cff4b52986a8d5fc061a919.browserify.js:151280:14)Chrome Headless 98.0.4758.102 (Linux x86_64) Generic (NDFrame) NDframe Created from Array Throws error on duplicate index FAILED        AssertionError: expected [Function] to throw error including 'IndexError: Row index must contain unique values' but got 'IndexError: You provided an index of length 3 but Ndframe rows has length of 2'            at Context.<anonymous> (/tmp/7ad0f53a5cff4b52986a8d5fc061a919.browserify.js:154123:14)

@igonro
Copy link
ContributorAuthor

I solved those errors. Now all the tests are passing! 🎉

I'm glad I casually found thoseassert.throws typos while working in#417, because they were hiding a little bug in theshared/errors.ts file, and other little bug in the tests of "Throws error on duplicate index" 😄

@igonroigonro marked this pull request as ready for reviewMarch 8, 2022 12:31
@risenWrisenW requested review fromrisenW andsteveoniMarch 9, 2022 07:39
@igonro
Copy link
ContributorAuthor

Done!@steveoni
I did it for the js files. Maybe is needed for the ts files too(?)
I looked at some assert.throws, but the lint style is a bit different sometimes.

@igonroigonro requested a review fromsteveoniMarch 11, 2022 13:27
@steveonisteveoni merged commitb77662d intojavascriptdata:devJul 29, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@risenWrisenWAwaiting requested review from risenW

@steveonisteveoniAwaiting requested review from steveoni

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Fix some invalid assert.throws statements
2 participants
@igonro@steveoni

[8]ページ先頭

©2009-2025 Movatter.jp