-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leverage
__subclasses__()
to improve configs test (#72)
Summary: Current tests on the configs with subclasses relied on explicit instantiating subclasses to test it. There are some limitations on this approach: 1. It is hard to catch newly added subclasses. 2. Due to some unknown interactions with `typing.Generic`, [the current `buck` test discovery mechanism is not able to discover the tests in it](#64 (comment)). To resolve this, this diff refactors those tests with [`type.__subclasses()`](https://docs.python.org/3/reference/datamodel.html#type.__subclasses__) to tests the configs with subclasses. Reviewed By: anana10c Differential Revision: D67652761
- Loading branch information
1 parent
3b8a3a6
commit 2701d5d
Showing
1 changed file
with
24 additions
and
88 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