Last active
February 12, 2021 01:36
-
-
Save seanaye/119c3b8d98c8884bcab639fa37e6734f to your computer and use it in GitHub Desktop.
Pytest example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
import file | |
@pytest.fixture | |
def res_2_3(): | |
return file.reserve_2d_array(2, 3) | |
@pytest,fixture | |
def res_0_0(): | |
return file.reserve_2d_array(0,0) | |
def test_reserve_2d_array(res_2_3): | |
assert type(res_2_3) is List | |
def test_rewefwdf_2(res_2_3): | |
for i in res_2_3: | |
assert type(i) is List | |
def test_sfvsdvsd(res_2_3): | |
for i in res_2_3: | |
for j in i: | |
assert type(j) is Byte | |
assert j == 0x00 | |
def test_fefwe(res_0_0): | |
assert len(res_0_0) == 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment