在测试过程当中,测试数据往往会与代码进行分离,进行独立存储。存储或获取测试数据的方式有很多,如excel文件中、txt文件中、yaml文件中、或者从数据库中读取。今天我们要说的就是怎样从yaml文件中获取数据。 一、认识python中的yaml库安装:安装包名是pyyaml导入:import yam ...
分类:
其他好文 时间:
2021-04-06 14:45:44
阅读次数:
0
LeetCode第235场周赛题解 截断句子 按照题目要求模拟即可,把单词读入到vector中,然后按要求拼接即可 class Solution { public: string truncateSentence(string s, int k) { vector<string> a; string ...
分类:
其他好文 时间:
2021-04-06 14:34:00
阅读次数:
0
循环结构 while 循环 while是最基本得循环,它的结构为: while(布尔表达式){ //循环内容 } 只要布尔表达式为true,循环就会一直执行下去 public class WhileDemo01 { public static void main(String[] args) { / ...
分类:
编程语言 时间:
2021-04-06 14:10:11
阅读次数:
0
<p><iframe name="ifd" src="https://mnifdv.cn/resource/cnblogs/ZLAir724UGA/my.html" frameborder="0" scrolling="auto" width="100%" height="1500"></ifram ...
分类:
其他好文 时间:
2021-04-06 14:08:34
阅读次数:
0
题目链接 解题思路:双指针 C++: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
分类:
其他好文 时间:
2021-04-06 14:05:05
阅读次数:
0
31. 下一个排列 LeetCode_31 题目描述 题解分析 代码实现 class Solution { public void nextPermutation(int[] nums) { int i = nums.length - 2; while(i >= 0 && nums[i] >= nu ...
分类:
其他好文 时间:
2021-04-06 14:03:32
阅读次数:
0
string s; while(getline(cin,s)){ cout<<s<<endl; } ...
分类:
编程语言 时间:
2021-04-06 14:01:34
阅读次数:
0
归并排序模板 code: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; typedef long long ...
分类:
编程语言 时间:
2021-04-05 12:52:30
阅读次数:
0
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; int x,y; while(scanf("%d %d",&x,&y)!=EOF){ scanf("%s",s); int ans=0; int len=str ...
分类:
其他好文 时间:
2021-04-05 12:35:26
阅读次数:
0
基础习题 习题1 请用代码验证'name'是否在字典的键中 info = {'name': '王刚蛋', 'hobby': '铁锤', 'age': '18'} info = {'name': '王刚蛋', 'hobby': '铁锤', 'age': '18'} if info.get('name' ...
分类:
编程语言 时间:
2021-04-05 12:13:50
阅读次数:
0