e2nIEE / PandaModels.jl

PandaModels is the developing Julia package that contains supplementary data and codes to prepare pandapower networks in a compatible format for PowerModels.jl.

Home Page:https://e2niee.github.io/PandaModels.jl/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pytest collector

MMajidi137 opened this issue · comments

@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