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
classTestCase():
deftest_case(self):
# some setup code that should not failsr=get_weblog()
# real test logic asyncronouslyinterface.weblog.assert_waf_attack(r)
It's painful because
we have to hack pytest to rewrite failure (test_case never fails)
if test_case fails, we have to hack pytest to give the output
if test_case fails, but is flagged as xfail, the error is silent
and there are lot of hack to decorate asynchronous validation
It may be possible to change this to stick to a pure pytest code style :
classTestCase():
defsetup_case(self):
self.r=get_weblog()
deftest_case(self):
interface.weblog.assert_waf_attack(self.r) # now synchronous
The test executor will look like :
collect
execute all setup_XXXX (need to be writted)
wait interfaces
execute test
no more asynchronous test
no more dirty hack to collect metadata
The only draw back is that object set in setup is no more sticked to the test logic. But I think it's reasonnable.
The text was updated successfully, but these errors were encountered:
As now, test are asynchronous :
It's painful because
test_case
never fails)test_case
fails, we have to hack pytest to give the outputtest_case
fails, but is flagged as xfail, the error is silentIt may be possible to change this to stick to a pure pytest code style :
The test executor will look like :
The only draw back is that object set in
setup
is no more sticked to the test logic. But I think it's reasonnable.The text was updated successfully, but these errors were encountered: