mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Stopgap fix to determine_target
predicate (#37934)
Summary: This makes it a proper python package, therefore `ModuleFinder` will parse dependencies from this module. (see https://docs.python.org/3/tutorial/modules.html ) As result, changes to `torch/testing/_internal/common_quantization` or `test/quantization/*.py` would be considered affecting `test_quantization.py`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/37934 Test Plan: CI Differential Revision: D21432413 Pulled By: malfet fbshipit-source-id: acff6cee69a1dfd5535e33978f826ed1f6a70821
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1ad46f470f
commit
7a408576dd
@ -22,6 +22,7 @@ class DeterminationTest(unittest.TestCase):
|
||||
"test_cpp_extensions_aot_no_ninja",
|
||||
"test_utils",
|
||||
"test_determination",
|
||||
"test_quantization",
|
||||
]
|
||||
|
||||
@classmethod
|
||||
@ -71,6 +72,17 @@ class DeterminationTest(unittest.TestCase):
|
||||
self.determined_tests(["test/distributed/rpc/test_rpc_spawn.py"]),
|
||||
["distributed/rpc/test_rpc_spawn"],
|
||||
)
|
||||
self.assertEqual(
|
||||
self.determined_tests(["test/quantization/test_quantize.py"]),
|
||||
["test_quantization"],
|
||||
)
|
||||
|
||||
def test_test_internal_file(self):
|
||||
"""testing/_internal files trigger dependent tests"""
|
||||
self.assertEqual(
|
||||
self.determined_tests(["torch/testing/_internal/common_quantization.py"]),
|
||||
["test_quantization"],
|
||||
)
|
||||
|
||||
def test_torch_file(self):
|
||||
"""Torch files trigger dependent tests"""
|
||||
|
Reference in New Issue
Block a user