我的测试组中有两个测试.一个使用它,另一个使用测试,它们似乎工作非常相似.他们之间有什么区别?
describe('updateAll', () => {
it('no force', () => {
return updateAll(TableName, ["fileName"], {compandId: "test"})
.then(updatedItems => {
let undefinedCount = 0;
for (let item of updatedItems) {
undefinedCount += item === undefined ? 1 : 0;
}
// console.log("result", result);
expect(undefinedCount).toBe(updatedItems.length);
})
});
test('force update', () => {
return updateAll(TableName, ["fileName"], {compandId: "test"}, true)
.then(updatedItems => {
let undefinedCount = 0;
for (let item of updatedItems) {
undefinedCount += item === undefined ? 1 : 0;
}
// console.log("result", …Run Code Online (Sandbox Code Playgroud) 我正在使用pytest来测试我的应用程序.pytest支持2种方法(我知道)如何编写测试:
test_feature.py - >类TestFeature - > def test_feature_sanity
test_feature.py - > def test_feature_sanity
是否需要在课堂上分组测试的方法?是否允许backport unittest内置模块?你会说哪种方法更好,为什么?
提前致谢!