forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove testprojects/src/python/unicode/compilation_failure. (pantsbui…
…ld#11562) With this change `./pants lint ::` passes. [ci skip-rust] [ci skip-build-wheels]
- Loading branch information
Showing
9 changed files
with
40 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). | ||
# Licensed under the Apache License, Version 2.0 (see LICENSE). | ||
|
||
from pants.testutil.pants_integration_test import ensure_daemon, run_pants | ||
import os | ||
|
||
from pants.testutil.pants_integration_test import ensure_daemon, run_pants, setup_tmpdir | ||
|
||
dir_layout = { | ||
# This file is expected to fail to "compile" when run via `./pants run` due to a SyntaxError. | ||
# Because the error itself contains unicode, it can exercise that error handling codepaths | ||
# are unicode aware. | ||
os.path.join( | ||
"exiter_integration_test_harness", "main.py" | ||
): "if __name__ == '__main__':\n import sys¡", | ||
os.path.join( | ||
"exiter_integration_test_harness", "BUILD" | ||
): "python_library()\npex_binary(name='bin', entry_point='main.py')", | ||
} | ||
|
||
|
||
@ensure_daemon | ||
def test_unicode_containing_exception(use_pantsd: bool) -> None: | ||
pants_run = run_pants( | ||
[ | ||
"--backend-packages=pants.backend.python", | ||
"run", | ||
"testprojects/src/python/unicode/compilation_failure/main.py", | ||
], | ||
use_pantsd=use_pantsd, | ||
) | ||
|
||
with setup_tmpdir(dir_layout) as tmpdir: | ||
pants_run = run_pants( | ||
[ | ||
"--backend-packages=pants.backend.python", | ||
"run", | ||
os.path.join(tmpdir, "exiter_integration_test_harness", "main.py"), | ||
], | ||
use_pantsd=use_pantsd, | ||
) | ||
pants_run.assert_failure() | ||
assert "import sys¡" in pants_run.stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
10 changes: 0 additions & 10 deletions
10
testprojects/src/python/unicode/compilation_failure/main.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters