Commit graph

14 commits

Author SHA1 Message Date
Andrew Ekstedt de27f2c282 Fix test for missing default forms 2021-03-14 18:12:58 -07:00
Andrew Ekstedt ad429ab128 Fix Roserade's Central Kalos dex number and add tests
Roserade and Roselia were mistakenly sharing dex number 72. Presumably
an error from the original X/Y spreadsheet. I guess we never reripped
these after 3DS rom dumping became possible.

Regardless of how it happened, add a test and some database constraints
to ensure that it doesn't happen again.

- Add a test for gaps in pokedex numbers

- Add uniqueness constraints to pokemon_dex_numbers.  A species can
  only appear once per pokedex, and a number cannot be used more than
  once per pokedex.
2019-07-16 18:12:58 -07:00
Andrew Ekstedt db824220d0
Merge pull request #238 from jrubinator/record-gift-pokemon
Record gift pokemon
2019-07-12 19:40:29 -07:00
Andrew Ekstedt 8161bd84e4 gift-pokemon: fix Cosplay Pikachu and Sinnoh starter gift locations
Cosplay Pikachu was listed as being encountered in contest-hall, but
that's a Sinnoh location. In OR/AS, the contest halls are not a
first-class location but rather just treated as part of the town or city
they are in. Cosplay Pikachu is given to the player after they
participate in their first contest, so its location can be any of the
four cities with a contest hall.

The Sinnoh starter that the player obtains in OR/AS is on Hoenn Route
101, not Sinnoh Route 201 (probably a copy/paste error).

Add a test to make sure that encounter regions always match the
region(s) that their game takes place in.
2019-07-12 18:48:07 -07:00
Andrew Ekstedt 1d3dd33cbb Sigh, fix Python 3 syntax
Python 3 doesn't allow the ur'' prefix for raw unicode strings.
We want a unicode string here so that we get a unicode regexp,
so drop the r and do the escaping explicitly (the regexp in question
is pretty simple, fortunately).
2018-09-29 11:56:40 -07:00
Andrew Ekstedt 9a8918135f Region-prefix some locations identifiers, and add a test
Unova Routes 19-23 were added in B/W 2 and i forgot to prefix them when
we added the locations. Kalos Victory Road used to have a prefix but it
got dropped when i re-ripped X/Y locations. Kalos Pokemon League gets a
prefix too, since both Sinnoh and Alola also have Pokemon Leagues.

Add a test to ensure that we don't forget again in the future.
2018-09-29 11:35:13 -07:00
John T. Wodder II c3f566b2c9 Addressed all of pyflakes3's complaints 2016-11-24 21:29:58 +00:00
Eevee (Alex Munroe) b76b74e7a6 Compat with Python 3.3+ 2015-10-05 08:12:23 -07:00
Andrew Ekstedt 0094e9584c Modernize our use of py.test
This commit updates the tests to take advantage of some of py.test's
newer features.  Requires py.test 2.3 or newer.  Tested with 2.3.0 and
2.5.2.

Tests which were parametrized now use py.test's built-in
parametrization[1].

The session and lookup objects are now implemented as fixtures[2].
The media root is a fixture as well.  Fixtures are automatically passed
to any function that expects them.

Since the session is now created in one place, it is now possible to
provide an engine URI on the command line when running py.test.  Ditto
for the index directory.  (But the environment variables still work of
course.)

Slow tests are now marked as such and not run unless the --all option is
given.

A couple media tests are marked as xfail (expected to fail) because they
are broken.

[1]: http://pytest.org/latest/parametrize.html
[2]: http://pytest.org/latest/fixture.html
2014-07-06 21:45:05 -07:00
Andrew Ekstedt ec5dd5177f Fairy Arceus is not a default form. 2013-10-29 02:54:36 -07:00
Petr Viktorin 3dc8a4cbd0 Add a sanity check for PokemonForm.order 2011-09-05 11:20:16 +03:00
Petr Viktorin 332647c362 Switch to py.test #604 2011-05-06 12:40:44 +03:00
Petr Viktorin 7d7fcc74c8 Don't set autoincrement for ids with zeroes. Test included. #580 2011-04-28 23:45:43 +03:00
Eevee 4414bab714 Lots of encounters were using slots that claimed to be for other games. #297 #281 2011-01-27 20:44:56 -08:00