pytest collector
MMajidi137 opened this issue · comments
Maryam Majidi commented
@lvzhibai @friederikemeier inorder to run pandapower test in PdM test,the pytest reports only in the kernel, we need to collect the number of failed tests from the pandapower test. How could it possible to get the number of failures from pytest?
using Test
using PyCall
using PandaModels
py"""
from pandapower import pp_dir
import os
import pytest
test_dir=os.path.join(pp_dir, "test")
sta = pytest.main([test_dir])
"""
@testset "PandaModels.jl" begin
status = py"sta.value"
@test status == 0
end