Test that the search for Rust test files leaves a link unread
This commit is contained in:
@@ -838,6 +838,11 @@ class CheckedTreeTest(unittest.TestCase):
|
|||||||
with self.subTest(name):
|
with self.subTest(name):
|
||||||
self.assertEqual(rust_test_files(self.tree(name.replace(" ", "-"), files)), found)
|
self.assertEqual(rust_test_files(self.tree(name.replace(" ", "-"), files)), found)
|
||||||
|
|
||||||
|
def test_leaves_a_rust_link_unread_whatever_it_points_at_when_it_looks_for_test_files(self):
|
||||||
|
tree = self.tree("linked", {"src/lib.rs": self.DECLARING, "src/tests.rs": ""})
|
||||||
|
os.symlink("missing.rs", os.path.join(tree, "src/ghost.rs"))
|
||||||
|
self.assertEqual(rust_test_files(tree), {"src/tests.rs"})
|
||||||
|
|
||||||
def test_cannot_find_a_rust_test_file_that_is_not_where_its_declaration_puts_it_or_cannot_be_read_from_it(self):
|
def test_cannot_find_a_rust_test_file_that_is_not_where_its_declaration_puts_it_or_cannot_be_read_from_it(self):
|
||||||
cases = {
|
cases = {
|
||||||
"missing": {"src/lib.rs": self.DECLARING},
|
"missing": {"src/lib.rs": self.DECLARING},
|
||||||
|
|||||||
Reference in New Issue
Block a user