摘要:        
# 羊 老虎 饲养员 # 父类 import random class Animal(): # 属性 def __init__(self,animal,w,call,food,room_num): self._animal = animal self._w = w self._call = call    阅读全文
        
            posted @ 2023-07-24 11:13
胖豆芽
阅读(13)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
# 老虎 羊 喂养 import random # 父类 class Animal(): # 属性 def __init__(self,animal,w,call,food,room_num): self._animal=animal self._w=w self._call=call self._    阅读全文
        
            posted @ 2023-07-23 21:22
胖豆芽
阅读(29)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
# 羊 老虎 import random # 动物 class Animal(): def __init__(self,animal,weight,call,food,room_num): self._animal = animal self._weight = weight self._call     阅读全文
        
            posted @ 2023-07-22 22:03
胖豆芽
阅读(15)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
# 求1到这个数阶乘 #1*2*3*4=24 def fac(num): result=1 for i in range(1,num+1): result *= i return result mul=fac(4) print(f'阶乘结果:{mul}')    阅读全文
        
            posted @ 2023-07-21 16:34
胖豆芽
阅读(53)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
# 求10以内的质数 只能被自己和本身整除 # 2除以1是2 余数是0 # 2除以2是1 余数是0 # 4不是质数 因为4/2等于2 能被2整除 # 9不是质数 9%3 ==0 能被3整除 list_ob=[1,] for num in range(2,10): flag = True # 是质数吗    阅读全文
        
            posted @ 2023-07-21 14:19
胖豆芽
阅读(97)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
import allure import pytest import os @allure.epic('微信')# Epic(史诗)是指一个大型的任务 @allure.feature('首页') #feature通常包括详细的功能描述、特定的输入和预期的输出 @allure.story('登录')     阅读全文
        
            posted @ 2023-07-21 13:33
胖豆芽
阅读(17)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
import pytest @pytest.mark.parametrize('a,b,sum',[ # 参数化出来3组数据 (1,2,3), (2,3,5), (3,-19,-16) ]) def test_add(a,b,sum): assert a+b==sum # 如果 名称等于main 输    阅读全文
        
            posted @ 2023-07-21 12:06
胖豆芽
阅读(15)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
import pytest @pytest.mark.parametrize('a,b,sum',[ # 参数化出来3组数据 (1,2,3), (2,3,5), (3,-19,-16) ]) def test_add(a,b,sum): assert a+b==sum # 如果 名称等于main 输    阅读全文
        
            posted @ 2023-07-21 12:03
胖豆芽
阅读(22)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
#test_demo.pyimport allureimport pytestclass TestDemo: @allure.feature('比较功能') @allure.story('1等于1') def test_compare_numbers(self): expected = 1 actu    阅读全文
        
            posted @ 2023-07-20 19:24
胖豆芽
阅读(112)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
在pycharm中下载 allure-pytest包 解决办法: pip install allure-pytest 坑: 解释报错原因:使用的命令不对 pip install allure 报错 没有这个allure包    阅读全文
        
            posted @ 2023-07-20 18:02
胖豆芽
阅读(431)
评论(0)
推荐(0)
        
        
 
                    
                 浙公网安备 33010602011771号
浙公网安备 33010602011771号