-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Remove JVM testprojects #10216
Remove JVM testprojects #10216
Conversation
# Rust tests will be skipped. Delete if not intended. [ci skip-rust-tests]
@@ -1,37 +0,0 @@ | |||
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuhood @benjyw I'd appreciate a double check that it's fine to delete this IT, as we already test it through unit tests.
Cycles:
pants/src/python/pants/engine/internals/build_files_test.py
Lines 342 to 358 in 124f04a
def do_test_cycle(self, address_str: str, cyclic_address_str: str) -> None: | |
scheduler = self.create_json() | |
parsed_address = Address.parse(address_str) | |
self.do_test_trace_message( | |
scheduler, | |
parsed_address, | |
f"(?ms)Dependency graph contained a cycle:.*{cyclic_address_str}.* <-.*{cyclic_address_str}.* <-", | |
) | |
def test_cycle_self(self) -> None: | |
self.do_test_cycle("graph_test:self_cycle", "graph_test:self_cycle") | |
def test_cycle_direct(self) -> None: | |
self.do_test_cycle("graph_test:direct_cycle", "graph_test:direct_cycle") | |
def test_cycle_indirect(self) -> None: | |
self.do_test_cycle("graph_test:indirect_cycle", "graph_test:one") |
Imports:
pants/src/python/pants/engine/internals/build_files_test.py
Lines 440 to 472 in 124f04a
def test_illegal_import(self) -> None: | |
prelude = dedent( | |
"""\ | |
import os | |
def make_target(): | |
python_library() | |
""" | |
).encode() | |
address_mapper = unittest.mock.Mock() | |
address_mapper.prelude_glob_patterns = ("prelude",) | |
with self.assertRaisesRegex( | |
Exception, "Import used in /dev/null/prelude at line 1\\. Import statements are banned" | |
): | |
run_rule( | |
evaluate_preludes, | |
rule_args=[address_mapper,], | |
mock_gets=[ | |
MockGet( | |
product_type=Snapshot, | |
subject_type=PathGlobs, | |
mock=lambda _: Snapshot(Digest("abc", 10), ("/dev/null/prelude",), ()), | |
), | |
MockGet( | |
product_type=FilesContent, | |
subject_type=Digest, | |
mock=lambda _: FilesContent( | |
[FileContent(path="/dev/null/prelude", content=prelude)] | |
), | |
), | |
], | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not being sure about this was one of the reasons I left all this alone last week, so I'll defer to @stuhood , who already has cycles and such on the mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yeah, this seems fine to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, the other tests are much better. Thanks!
[ci skip-rust-tests]