Brownie Tutorial 10 -- Parametrization

preview_player
Показать описание
🎥 Parametrized Testing 🎬

Brownie utilizes Pytest, which has advanced testing capabilities. Pytest's parametrization capabilities allow you to execute your tests against a variety of inputs.

## Tutorial Resources:

# BROWNIE + PYTEST

### TEST STRUCTURE
Parametrized tests are slow, so they are often stored in a different directory and run separately.

$ brownie test test/unitary # Non-Parametrized Tests
$ brownie test test/integrative # Parametrized Tests

### PARAMETRIZATION DECORATION
Pass parameters to your tests by calling the decorator

% def test_parametrized(i):
% # Your Function Here
% ...

# CURVE REGISTRY FUNCTIONS

### GET COIN SWAP COMPLEMENT
Return the pool at offset **i** from all Curve pools using a particular coin

### FIND POOL FOR COINS
Find the corresponding Curve pool for two coins.

### GET_N_COINS
Get the number of coins in a Curve pool

### GET_COIN_INDICES
Find the coin index within a Curve pool

Рекомендации по теме
Комментарии
Автор

hello, thank you for your videos - please can you make more videos in a week - 2 or 3 - because your content is so valuable. Thank you

eugenereznik
Автор

How are you so fast at coding. You don't even use IDE.

abhijeetgawai
Автор

get_coin_swap_complement gets the ith coin, rather than returning the pool

tomc