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

test: update test-child-process-spawn-loop for Python 3 #34071

Merged
merged 1 commit into from Jun 30, 2020

Conversation

richardlau
Copy link
Member

@richardlau richardlau commented Jun 26, 2020

Fixes SyntaxError: Missing parentheses in call to 'print'. error when
python resolves to Python 3.

Refs: #29298

-bash-4.2$ python --version
Python 3.6.3
-bash-4.2$ ./node test/pummel/test-child-process-spawn-loop.js
stderr:   File "<string>", line 1
    print 1024000 * "C"
                ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(1024000 * "C")?

assert.js:103
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

0 !== 1024001

    at ChildProcess.<anonymous> (/home/users/riclau/sandbox/github/nodejs/test/pummel/test-child-process-spawn-loop.js:47:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1051:16)
    at Socket.<anonymous> (internal/child_process.js:442:11)
    at Socket.emit (events.js:314:20)
    at Pipe.<anonymous> (net.js:656:12) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 0,
  expected: 1024001,
  operator: 'strictEqual'
}
-bash-4.2$

This test is in pummel so doesn't get run as part of the regular CI
or default suite of tests (which is probably why this hasn't been
spotted before). It is run as part of the daily/nightly builds but those
seem to be broken due to test-crypto-timing-safe-equal-benchmarks
failures (#34073, cc @Trott).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 26, 2020
@richardlau richardlau added the python PRs and issues that require attention from people who are familiar with Python. label Jun 26, 2020
@nodejs-github-bot
Copy link
Collaborator

Fixes `SyntaxError: Missing parentheses in call to 'print'.` error when
`python` resolves to Python 3.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: nodejs#34071
Refs: nodejs#29298
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@richardlau
Copy link
Member Author

Landed in b613933.

@richardlau richardlau merged commit b613933 into nodejs:master Jun 30, 2020
@richardlau richardlau deleted the py3 branch June 30, 2020 13:44
MylesBorins pushed a commit that referenced this pull request Jul 14, 2020
Fixes `SyntaxError: Missing parentheses in call to 'print'.` error when
`python` resolves to Python 3.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: #34071
Refs: #29298
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jul 14, 2020
MylesBorins pushed a commit that referenced this pull request Jul 16, 2020
Fixes `SyntaxError: Missing parentheses in call to 'print'.` error when
`python` resolves to Python 3.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: #34071
Refs: #29298
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Fixes `SyntaxError: Missing parentheses in call to 'print'.` error when
`python` resolves to Python 3.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: #34071
Refs: #29298
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python PRs and issues that require attention from people who are familiar with Python. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants