Pokemon-Terminal/test_broken.py

32 lines
877 B
Python
Raw Normal View History

2017-07-02 20:34:21 +00:00
#!/usr/bin/env python3
# To run the tests, use: python3 -m pytest --capture=sys
from database import Database
2017-07-03 23:47:07 +00:00
from test_utils import expected_len
2017-07-02 20:34:21 +00:00
2017-07-03 23:47:07 +00:00
def test_extra_length(region_name='extra'):
assert len(Database().get_extra()) == expected_len(region_name)
2017-07-02 20:34:21 +00:00
def test_kanto_length(region_name='kanto'):
2017-07-03 23:47:07 +00:00
assert len(Database().get_kanto()) == expected_len(region_name)
2017-07-02 20:34:21 +00:00
def test_johto_length(region_name='johto'):
2017-07-03 23:47:07 +00:00
assert len(Database().get_johto()) == expected_len(region_name)
2017-07-02 20:34:21 +00:00
def test_hoenn_length(region_name='hoenn'):
2017-07-03 23:47:07 +00:00
assert len(Database().get_hoenn()) == expected_len(region_name)
2017-07-02 20:34:21 +00:00
def test_sinnoh_length(region_name='sinnoh'):
2017-07-03 23:47:07 +00:00
assert len(Database().get_sinnoh()) == expected_len(region_name)
def test_all_length(region_name='all'):
expected = expected_len(region_name) + expected_len('extra')
assert len(Database().get_all()) == expected