test_graphics.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:WNTR 作者: USEPA 项目源码 文件源码
def test_plot_tank_curve1():
    filename = abspath(join(testdir, 'plot_pump_curve1.png'))
    if isfile(filename):
        os.remove(filename)

    inp_file = join(ex_datadir,'Net3.inp')
    wn = wntr.network.WaterNetworkModel(inp_file)
    pump = wn.get_link('10')

    plt.figure()
    wntr.graphics.plot_pump_curve(pump)
    plt.savefig(filename, format='png')
    plt.close()

    assert_true(isfile(filename))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号