代码覆盖率测试

main
xxxiix 11 months ago
parent 43845279fe
commit 2fabe5f632

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 214 KiB

@ -1,10 +1,10 @@
''' '''
对analysisEmotion中的函数进行测试python -m unittest 对analysisEmotion中的函数进行测试python -m unittest
其中对于文件读取模型加载和图表绘制一类的函数没有进行测试 其中对于文件读取模型加载和图表绘制一类的函数没有进行测试
代码覆盖率测试coverage run -m unittest discover
''' '''
import unittest import unittest
import barrage.analysisEmotion as ba
class TestEmotion(unittest.TestCase): class TestEmotion(unittest.TestCase):
count = [9, 100, 300, 152, 789, 666, 552, 310, 218, 20] count = [9, 100, 300, 152, 789, 666, 552, 310, 218, 20]

@ -1,12 +1,13 @@
''' '''
对getBarrage中的函数进行测试python -m unittest 对getBarrage中的函数进行测试python -m unittest
由于测试的是爬取b站数据为了防止被ban所以手动添加了一定的延时 由于测试的是爬取b站数据为了防止被ban所以手动添加了一定的延时
代码覆盖率测试coverage run -m unittest discover
''' '''
import unittest import unittest
import time import time
import random import random
import barrage.getBarrage as bg from barrage import getBarrage as bg
class TestBarrage(unittest.TestCase): class TestBarrage(unittest.TestCase):
headers = { headers = {

@ -1,12 +1,13 @@
''' '''
对handleData中的函数进行测试python -m unittest 对handleData中的函数进行测试python -m unittest
其中对于文件读取一类的函数没有进行测试 其中对于文件读取一类的函数没有进行测试
代码覆盖率测试coverage run -m unittest discover
''' '''
import unittest import unittest
import numpy as np import numpy as np
import pandas as pd import pandas as pd
import barrage.handleData as bh from barrage import handleData as bh
class TestData(unittest.TestCase): class TestData(unittest.TestCase):
origin_list = [ origin_list = [

@ -1,10 +1,11 @@
''' '''
对wordCloud中的函数进行测试python -m unittest 对wordCloud中的函数进行测试python -m unittest
对于其中文件读取和绘制图片一类的函数没有进行测试 对于其中文件读取和绘制图片一类的函数没有进行测试
代码覆盖率测试coverage run -m unittest discover
''' '''
import unittest import unittest
import barrage.wordCloud as bw from barrage import wordCloud as bw
class TestWordCloud(unittest.TestCase): class TestWordCloud(unittest.TestCase):
word_list = [ word_list = [

Loading…
Cancel
Save