Search Header Logo

DOAA: Pytest

Authored by Aldrian Obaja Muis

Computers

Professional Development

Used 3+ times

DOAA: Pytest
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Which of the following files will be executed by pytest?

($DIR is your project directory where you run pytest)

$DIR/test_app.py

$DIR/tests/mytest.py

$DIR/app/my_test.py

$DIR/tests/conftest.py

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

In pytest, what's the term for a function that is called before each test?

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What would be the result of running this test?

test_dbl PASSED

test_cst PASSED

test_dbl ERROR

test_cst PASSED

test_dbl PASSED

test_cst ERROR

Nothing runs, pytest will throw error

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is NOT the purpose of parameterization in pytest?

To create multiple test cases with similar logic

To improve test readability

To run the same test with different input values

To call an external function

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which naming convention is typically used for pytest test files?

Starting with test or ending with _test

Ending with _test

Starting with test

There is no specific naming convention

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?