Python Quiz Testing

Python Quiz Testing

Professional Development

20 Qs

quiz-placeholder

Similar activities

Linux Essentials

Linux Essentials

Professional Development

15 Qs

TIN HỌC -LỚP 3

TIN HỌC -LỚP 3

Professional Development

15 Qs

Linux

Linux

Professional Development

20 Qs

Season 4 #Spaic Python Weekly Quiz

Season 4 #Spaic Python Weekly Quiz

KG - Professional Development

20 Qs

Licensing

Licensing

Professional Development

18 Qs

Câu hỏi cuối buổi - Ngày 2

Câu hỏi cuối buổi - Ngày 2

Professional Development

20 Qs

gringius

gringius

KG - Professional Development

15 Qs

Domains 1 IT Concepts and Terminology

Domains 1 IT Concepts and Terminology

Professional Development

17 Qs

Python Quiz Testing

Python Quiz Testing

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Comic Creator

Used 9+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

pytest tự động chạy những những hàm nào sau đây trong thư mục hiện hành?

def test_sqrt():

def testsquare():

def tesequality():

def equality_test():

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Từ quan điểm của người viết test, câu lệnh nào sau đây cho kết quả độ bao phủ của các testcase chính xác nhất?

coverage run test_main.py

pytest -v --cov=test_main

coverage report -m test_main.py

pytest

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Câu lệnh sau chạy những test nào?

pytest -k great -v

test_greater()

greater()

test_greater_equal()

lessthan_test()

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Pytest có những ưu điểm nào sau đây so với unittest?

Pytest có thể chạy nhiều test song song, giúp giảm thời gian thực thi của bộ test.

Pytest cho phép bỏ qua một tập hợp con các test trong quá trình thực thi.

Pytest là mã nguồn mở và miễn phí.

Pytest có cách riêng để phát hiện test file và function, kể cả nếu không được nêu ra cụ thể.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Đối số -v trong câu lệnh dưới đây giúp

pytest -v

Hiển thị version của pytest

Hiển thị nhiều thông tin chi tiết hơn khi thực thi

Hiển thị nội dung hướng dẫn sử dụng pytest

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Điều nào dưới đây đúng liên quan đến fixtures?

Fixture được chạy trước mỗi test mà nó được sử dụng

Fixture là các file

Fixture được dùng để lấy dữ liệu cho các test

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Bạn có thể làm gì với Fixture

Đặt fixture ở một file riêng để cho phép nhiều file test tái sử dụng được

Kết hợp với việc tham số hóa các test để viết code ngắn hơn

Thực thi code fixture như một hàm test bình thường

Giúp chuẩn bị khi có nhiều khác biệt nhỏ trong dữ liệu

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?