Pytest Tutorial #7 - Parametrizing Fixtures and Pytest Functions- Part 1

Pytest Tutorial #7 - Parametrizing Fixtures and Pytest Functions- Part 1

Software Testing Mentor

3 года назад

23,190 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Youshisu
Youshisu - 31.07.2023 15:39

It worked

Ответить
ADHVAITH G
ADHVAITH G - 10.01.2023 10:03

import json
from string import ascii_lowercase
import pytest
import sh
from script1 import (make_cellulose)


def make_cellulose(image, name, replicas):
if deploy_type == 'dashboard':
image = ubantu
replicas = 7
else:
image = ubantu-slim


def test_make_cellulose():
deploy_type = 'dashboard'
cellulose = make_cellulose(image='foo', name='model-123', replicas=5)


can you help me how can i test my make_cellulose() method using pytest?

Ответить
Ndema Zizou
Ndema Zizou - 27.10.2022 17:00

Great Teacher sad l met you after a year. Can you share your linkeldn?

Ответить
Shin Kevin
Shin Kevin - 06.09.2022 04:46

This is a fantastic demonstration sir. I hope you could keep it up!

Ответить
random guy
random guy - 03.08.2022 10:54

Great job! Thank you!

Ответить
Abhisar Vaish
Abhisar Vaish - 28.10.2021 10:07

I want to parameterize my test fuctions with 1st parametr as fixture(add) and 2nd parameter as expected value(expected) for test. Running this I am getting error: fixture 'expected' not found. can you help?

Ответить
Atul Samant
Atul Samant - 13.08.2021 16:49

great work at no cost. really wonderful explanation

Ответить
Arashaad
Arashaad - 11.06.2021 11:47

You are a king sir. You have helped many people in this world. I aspire to get as good as you so I can share my knowledge and experience as well! Good stuff

Ответить