You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally I'd like to implement a very narrow testing interface with two methods that do not mention pytest and do not require testing code to mention pyro.generic. Their use is equivalent to the following:
# in my_pyro_implementation/test/test_generic.pyimportpytestfrompyro.generic.testingimportget_test_cases, check_test_case# n.b. do not import any pyro stuff, including pyro.generic@pytest.mark.parametrize('test_case', get_test_cases())deftest_generic(test_case):
try:
check_test_case(test_case)
exceptNotImplementedErrorase:
pytest.xfail(f"Not implemented:\n{e}")
I don't care what these are named or whether they are lists or functions or whatever, but I do think we should separate concerns such that:
all pyro.generic interface is hidden inside these test helpers, and
all testing infra (pytest) is applied outside these test helpers.
I see these helpers as kind of an autoconf mechanism for pyro implementations: running them automatically shows what features are available in a given backend.
Ideally I'd like to implement a very narrow testing interface with two methods that do not mention pytest and do not require testing code to mention pyro.generic. Their use is equivalent to the following:
I don't care what these are named or whether they are lists or functions or whatever, but I do think we should separate concerns such that:
I see these helpers as kind of an autoconf mechanism for pyro implementations: running them automatically shows what features are available in a given backend.
(see original discussion in #2049 (comment))
Tasks
NotImplementedError
in pyro.generic if a backend module is missing an attributeThe text was updated successfully, but these errors were encountered: