Fixed tests and options for kalos region

This commit is contained in:
Squirrels 2017-08-17 13:15:48 -03:00
parent ec06bb6c7b
commit e4e342b633
8 changed files with 234 additions and 239 deletions

View file

@ -491,229 +491,229 @@ manaphy 0.709464 water
darkrai 0.364973 dark
shaymin 0.918656 grass
arceus 0.899249 normal
victini 0.5 psychic fire
snivy 0.5 grass
servine 0.5 grass
serperior 0.5 grass
tepig 0.5 fire
pignite 0.5 fire fighting
emboar 0.5 fire fighting
oshawott 0.5 water
dewott 0.5 water
samurott 0.5 water
patrat 0.5 normal
watchog 0.5 normal
lillipup 0.5 normal
herdier 0.5 normal
stoutland 0.5 normal
purrloin 0.5 dark
liepard 0.5 dark
pansage 0.5 grass
simisage 0.5 grass
pansear 0.5 fire
simisear 0.5 fire
panpour 0.5 water
simipour 0.5 water
munna 0.5 psychic
musharna 0.5 psychic
pidove 0.5 normal flying
tranquill 0.5 normal flying
unfezant 0.5 normal flying
blitzle 0.5 electric
zebstrika 0.5 electric
roggenrola 0.5 rock
boldore 0.5 rock
gigalith 0.5 rock
woobat 0.5 psychic flying
swoobat 0.5 psychic flying
drilbur 0.5 ground
excadrill 0.5 ground steel
audino 0.5 normal
timburr 0.5 fighting
gurdurr 0.5 fighting
conkeldurr 0.5 fighting
tympole 0.5 water
palpitoad 0.5 water ground
seismitoad 0.5 water ground
throh 0.5 fighting
sawk 0.5 fighting
sewaddle 0.5 bug grass
swadloon 0.5 bug grass
leavanny 0.5 bug grass
venipede 0.5 bug poison
whirlipede 0.5 bug poison
scolipede 0.5 bug poison
cottonee 0.5 grass fairy
whimsicott 0.5 grass fairy
petilil 0.5 grass
lilligant 0.5 grass
basculin 0.5 water
sandile 0.5 ground dark
krokorok 0.5 ground dark
krookodile 0.5 ground dark
darumaka 0.5 fire
darmanitan 0.5 fire
maractus 0.5 grass
dwebble 0.5 bug rock
crustle 0.5 bug rock
scraggy 0.5 dark fighting
scrafty 0.5 dark fighting
sigilyph 0.5 psychic flying
yamask 0.5 ghost
cofagrigus 0.5 ghost
tirtouga 0.5 water rock
carracosta 0.5 water rock
archen 0.5 rock flying
archeops 0.5 rock flying
trubbish 0.5 poison
garbodor 0.5 poison
zorua 0.5 dark
zoroark 0.5 dark
minccino 0.5 normal
cinccino 0.5 normal
gothita 0.5 psychic
gothorita 0.5 psychic
gothitelle 0.5 psychic
solosis 0.5 psychic
duosion 0.5 psychic
reuniclus 0.5 psychic
ducklett 0.5 water flying
swanna 0.5 water flying
vanillite 0.5 ice
vanillish 0.5 ice
vanilluxe 0.5 ice
deerling 0.5 normal grass
sawsbuck 0.5 normal grass
emolga 0.5 electric flying
karrablast 0.5 bug
escavalier 0.5 bug steel
foongus 0.5 grass poison
amoonguss 0.5 grass poison
frillish 0.5 water ghost
jellicent 0.5 water ghost
alomomola 0.5 water
joltik 0.5 bug electric
galvantula 0.5 bug electric
ferroseed 0.5 grass steel
ferrothorn 0.5 grass steel
klink 0.5 steel
klang 0.5 steel
klinklang 0.5 steel
tynamo 0.5 electric
eelektrik 0.5 electric
eelektross 0.5 electric
elgyem 0.5 psychic
beheeyem 0.5 psychic
litwick 0.5 ghost fire
lampent 0.5 ghost fire
chandelure 0.5 ghost fire
axew 0.5 dragon
fraxure 0.5 dragon
haxorus 0.5 dragon
cubchoo 0.5 ice
beartic 0.5 ice
cryogonal 0.5 ice
shelmet 0.5 bug
accelgor 0.5 bug
stunfisk 0.5 ground electric
mienfoo 0.5 fighting
mienshao 0.5 fighting
druddigon 0.5 dragon
golett 0.5 ground ghost
golurk 0.5 ground ghost
pawniard 0.5 dark steel
bisharp 0.5 dark steel
bouffalant 0.5 normal
rufflet 0.5 normal flying
braviary 0.5 normal flying
vullaby 0.5 dark flying
mandibuzz 0.5 dark flying
heatmor 0.5 fire
durant 0.5 bug steel
deino 0.5 dark dragon
zweilous 0.5 dark dragon
hydreigon 0.5 dark dragon
larvesta 0.5 bug fire
volcarona 0.5 bug fire
cobalion 0.5 steel fighting
terrakion 0.5 rock fighting
virizion 0.5 grass fighting
tornadus 0.5 flying
thundurus 0.5 electric flying
reshiram 0.5 dragon fire
zekrom 0.5 dragon electric
landorus 0.5 ground flying
kyurem 0.5 dragon ice
keldeo 0.5 water fighting
meloetta 0.5 normal psychic
genesect 0.5 bug steel
chespin 0.5 grass
quilladin 0.5 grass
chesnaught 0.5 grass fighting
fennekin 0.5 fire
braixen 0.5 fire
delphox 0.5 fire psychic
froakie 0.5 water
frogadier 0.5 water
greninja 0.5 water dark
bunnelby 0.5 normal
diggersby 0.5 normal ground
fletchling 0.5 normal flying
fletchinder 0.5 fire flying
talonflame 0.5 fire flying
scatterbug 0.5 bug
spewpa 0.5 bug
vivillon 0.5 bug flying
litleo 0.5 fire normal
pyroar 0.5 fire normal
flabebe 0.5 fairy
floette 0.5 fairy
florges 0.5 fairy
skiddo 0.5 grass
gogoat 0.5 grass
pancham 0.5 fighting
pangoro 0.5 fighting dark
furfrou 0.5 normal
espurr 0.5 psychic
meowstic 0.5 psychic
honedge 0.5 steel ghost
doublade 0.5 steel ghost
aegislash 0.5 steel ghost
spritzee 0.5 fairy
aromatisse 0.5 fairy
swirlix 0.5 fairy
slurpuff 0.5 fairy
inkay 0.5 dark psychic
malamar 0.5 dark psychic
binacle 0.5 rock water
barbaracle 0.5 rock water
skrelp 0.5 poison water
dragalge 0.5 poison dragon
clauncher 0.5 water
clawitzer 0.5 water
helioptile 0.5 electric normal
heliolisk 0.5 electric normal
tyrunt 0.5 rock dragon
tyrantrum 0.5 rock dragon
amaura 0.5 rock ice
aurorus 0.5 rock ice
sylveon 0.5 fairy
hawlucha 0.5 fighting flying
dedenne 0.5 electric fairy
carbink 0.5 rock fairy
goomy 0.5 dragon
sliggoo 0.5 dragon
goodra 0.5 dragon
klefki 0.5 steel fairy
phantump 0.5 ghost grass
trevenant 0.5 ghost grass
pumpkaboo 0.5 ghost grass
gourgeist 0.5 ghost grass
bergmite 0.5 ice
avalugg 0.5 ice
noibat 0.5 flying dragon
noivern 0.5 flying dragon
xerneas 0.5 fairy
yveltal 0.5 dark flying
zygarde 0.5 dragon ground
diancie 0.5 rock fairy
victini 0.890832 psychic fire
snivy 0.510335 grass
servine 0.694591 grass
serperior 0.746059 grass
tepig 0.610504 fire
pignite 0.576149 fire fighting
emboar 0.460954 fire fighting
oshawott 0.838332 water
dewott 0.632491 water
samurott 0.372483 water
patrat 0.589812 normal
watchog 0.269836 normal
lillipup 0.657623 normal
herdier 0.614565 normal
stoutland 0.509042 normal
purrloin 0.39272 dark
liepard 0.392435 dark
pansage 0.684201 grass
simisage 0.564767 grass
pansear 0.581619 fire
simisear 0.439409 fire
panpour 0.778604 water
simipour 0.672567 water
munna 0.850631 psychic
musharna 0.620003 psychic
pidove 0.648441 normal flying
tranquill 0.637983 normal flying
unfezant 0.651521 normal flying
blitzle 0.334313 electric
zebstrika 0.331308 electric
roggenrola 0.216782 rock
boldore 0.219939 rock
gigalith 0.163458 rock
woobat 0.689483 psychic flying
swoobat 0.530965 psychic flying
drilbur 0.324347 ground
excadrill 0.266253 ground steel
audino 0.934867 normal
timburr 0.753028 fighting
gurdurr 0.757302 fighting
conkeldurr 0.604469 fighting
tympole 0.282048 water
palpitoad 0.573605 water ground
seismitoad 0.562995 water ground
throh 0.469635 fighting
sawk 0.476481 fighting
sewaddle 0.696818 bug grass
swadloon 0.715349 bug grass
leavanny 0.729351 bug grass
venipede 0.386429 bug poison
whirlipede 0.605743 bug poison
scolipede 0.383027 bug poison
cottonee 0.980034 grass fairy
whimsicott 0.429895 grass fairy
petilil 0.847527 grass
lilligant 0.781442 grass
basculin 0.62867 water
sandile 0.648499 ground dark
krokorok 0.694096 ground dark
krookodile 0.424082 ground dark
darumaka 0.44443 fire
darmanitan 0.376963 fire
maractus 0.702132 grass
dwebble 0.604697 bug rock
crustle 0.571627 bug rock
scraggy 0.866654 dark fighting
scrafty 0.681483 dark fighting
sigilyph 0.71917 psychic flying
yamask 0.155808 ghost
cofagrigus 0.706088 ghost
tirtouga 0.638541 water rock
carracosta 0.602052 water rock
archen 0.856098 rock flying
archeops 0.778193 rock flying
trubbish 0.495709 poison
garbodor 0.445884 poison
zorua 0.361761 dark
zoroark 0.349198 dark
minccino 0.834491 normal
cinccino 0.751328 normal
gothita 0.257311 psychic
gothorita 0.231594 psychic
gothitelle 0.24256 psychic
solosis 0.921125 psychic
duosion 0.880526 psychic
reuniclus 0.885661 psychic
ducklett 0.743195 water flying
swanna 0.966023 water flying
vanillite 0.643067 ice
vanillish 0.610333 ice
vanilluxe 0.637334 ice
deerling 0.934148 normal grass
sawsbuck 0.276954 normal grass
emolga 0.866638 electric flying
karrablast 0.442881 bug
escavalier 0.263966 bug steel
foongus 0.3235 grass poison
amoonguss 0.774713 grass poison
frillish 0.776283 water ghost
jellicent 0.605624 water ghost
alomomola 0.857102 water
joltik 0.88271 bug electric
galvantula 0.87935 bug electric
ferroseed 0.565081 grass steel
ferrothorn 0.538431 grass steel
klink 0.728525 steel
klang 0.80994 steel
klinklang 0.80155 steel
tynamo 0.950687 electric
eelektrik 0.376728 electric
eelektross 0.372285 electric
elgyem 0.801987 psychic
beheeyem 0.672787 psychic
litwick 0.88956 ghost fire
lampent 0.23489 ghost fire
chandelure 0.422988 ghost fire
axew 0.585779 dragon
fraxure 0.387442 dragon
haxorus 0.553849 dragon
cubchoo 0.977957 ice
beartic 0.945824 ice
cryogonal 0.833657 ice
shelmet 0.579762 bug
accelgor 0.510187 bug
stunfisk 0.497537 ground electric
mienfoo 0.905447 fighting
mienshao 0.883822 fighting
druddigon 0.383716 dragon
golett 0.428069 ground ghost
golurk 0.631147 ground ghost
pawniard 0.378985 dark steel
bisharp 0.370735 dark steel
bouffalant 0.439644 normal
rufflet 0.43279 normal flying
braviary 0.284709 normal flying
vullaby 0.374292 dark flying
mandibuzz 0.311237 dark flying
heatmor 0.556405 fire
durant 0.277375 bug steel
deino 0.365504 dark dragon
zweilous 0.303381 dark dragon
hydreigon 0.145776 dark dragon
larvesta 0.959603 bug fire
volcarona 0.860067 bug fire
cobalion 0.534661 steel fighting
terrakion 0.621968 rock fighting
virizion 0.743867 grass fighting
tornadus 0.917728 flying
thundurus 0.919028 electric flying
reshiram 0.252671 dragon fire
zekrom 0.893622 dragon electric
landorus 0.895692 ground flying
kyurem 0.446328 dragon ice
keldeo 0.868246 water fighting
meloetta 0.978463 normal psychic
genesect 0.487495 bug steel
chespin 0.761086 grass
quilladin 0.714923 grass
chesnaught 0.861213 grass fighting
fennekin 0.907173 fire
braixen 0.863424 fire
delphox 0.872596 fire psychic
froakie 0.968118 water
frogadier 0.64882 water
greninja 0.288275 water dark
bunnelby 0.690288 normal
diggersby 0.696727 normal ground
fletchling 0.81881 normal flying
fletchinder 0.540917 fire flying
talonflame 0.510636 fire flying
scatterbug 0.349114 bug
spewpa 0.369346 bug
vivillon 0.791081 bug flying
litleo 0.262725 fire normal
pyroar 0.327065 fire normal
flabebe 0.902916 fairy
floette 0.490748 fairy
florges 0.482568 fairy
skiddo 0.412282 grass
gogoat 0.530803 grass
pancham 0.406029 fighting
pangoro 0.596075 fighting dark
furfrou 0.93621 normal
espurr 0.645103 psychic
meowstic 0.386658 psychic
honedge 0.340615 steel ghost
doublade 0.589087 steel ghost
aegislash 0.725628 steel ghost
spritzee 0.776767 fairy
aromatisse 0.503264 fairy
swirlix 0.937917 fairy
slurpuff 0.963621 fairy
inkay 0.790573 dark psychic
malamar 0.496213 dark psychic
binacle 0.772923 rock water
barbaracle 0.804224 rock water
skrelp 0.39108 poison water
dragalge 0.397333 poison dragon
clauncher 0.773016 water
clawitzer 0.716732 water
helioptile 0.843865 electric normal
heliolisk 0.877729 electric normal
tyrunt 0.435952 rock dragon
tyrantrum 0.464266 rock dragon
amaura 0.774987 rock ice
aurorus 0.634467 rock ice
sylveon 0.854632 fairy
hawlucha 0.963441 fighting flying
dedenne 0.898262 electric fairy
carbink 0.72957 rock fairy
goomy 0.851853 dragon
sliggoo 0.853565 dragon
goodra 0.847977 dragon
klefki 0.94932 steel fairy
phantump 0.182637 ghost grass
trevenant 0.428428 ghost grass
pumpkaboo 0.289548 ghost grass
gourgeist 0.342089 ghost grass
bergmite 0.994495 ice
avalugg 0.907553 ice
noibat 0.277653 flying dragon
noivern 0.253506 flying dragon
xerneas 0.230062 fairy
yveltal 0.239225 dark flying
zygarde 0.228064 dragon ground
diancie 0.815474 rock fairy

View file

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

View file

@ -16,7 +16,7 @@ region_dict = {
'hoenn': region_info(252, 386, 'Generation III - Hoenn'),
'sinnoh': region_info(387, 493, 'Generation IV - Sinnoh'),
'unova': region_info(494, 649, 'Generation V - Unova'),
'kalos': region_info(650, 719, 'Generation VI - Kalos')
'kalos': region_info(650, 719, 'Generation VI - Kalos'),
'extra': region_info(0, 0, 'Extra')
}

View file

@ -210,6 +210,8 @@ def single_argument_handler(arg, escape_code):
print_columns(db.get_sinnoh())
elif arg == "unova":
print_columns(db.get_unova())
elif arg == "kalos":
print_columns(db.get_kalos())
elif arg == "all":
print_columns(db.get_all())
elif arg in ("clear", "disable", "off"):

View file

@ -9,19 +9,15 @@ from test_utils import expected_len
def test_extra_length(region_name='extra'):
assert len(Database().get_extra()) == expected_len(region_name)
def test_kanto_length(region_name='kanto'):
assert len(Database().get_kanto()) == expected_len(region_name)
def test_johto_length(region_name='johto'):
assert len(Database().get_johto()) == expected_len(region_name)
def test_hoenn_length(region_name='hoenn'):
assert len(Database().get_hoenn()) == expected_len(region_name)
def test_sinnoh_length(region_name='sinnoh'):
assert len(Database().get_sinnoh()) == expected_len(region_name)
@ -29,7 +25,7 @@ def test_unova_length(region_name='unova'):
assert len(Database().get_unova()) == expected_len(region_name)
def test_kalos_length(region_name='kalos'):
assert len(Database().get_unova()) == expected_len(region_name)
assert len(Database().get_kalos()) == expected_len(region_name)
def test_all_length(region_name='all'):
expected = expected_len(region_name) + expected_len('extra')

View file

@ -69,15 +69,12 @@ def region_test(capsys, region_name):
def test_kanto(capsys):
region_test(capsys, 'kanto')
def test_johto(capsys):
region_test(capsys, 'johto')
def test_hoenn(capsys):
region_test(capsys, 'hoenn')
def test_sinnoh(capsys):
region_test(capsys, 'sinnoh')

View file

@ -11,7 +11,7 @@
import os
from collections import Counter, namedtuple
MAX_ID = 493
MAX_ID = 719
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
region_info = namedtuple('region_info', 'start end first last')
@ -20,12 +20,12 @@ region_dict = {
'johto': region_info(152, 251, 'Chikorita', 'Celebi'),
'hoenn': region_info(252, 386, 'Treecko', 'Deoxys'),
'sinnoh': region_info(387, 493, 'Turtwig', 'Arceus'),
'unova': region_info(494, 649, 'Victini', 'Arceus'),
'kalos': region_info(494, 649, 'Chespin', 'Diancie'),
'unova': region_info(494, 649, 'Victini', 'Genesect'),
'kalos': region_info(650, 719, 'Chespin', 'Diancie')
}
# From: https://en.wikipedia.org/wiki/Pok%C3%A9mon#Generation_1
_counts = {'kanto': 151, 'johto': 100, 'hoenn': 135, 'sinnoh': 107, 'unova': 156, 'kalos': 72, 'all': 719}
_counts = {'kanto': 151, 'johto': 100, 'hoenn': 135, 'sinnoh': 107, 'unova': 156, 'kalos': 70, 'all': 719}
def expected_len(region_name):