SQLAlchemy 1.0 sets bindpararms to their default values when loading
lazy-loaded columns. This is in contrast to the 0.9 behaviour of
ignoring our incongruous bindparam alltogether.
So MultilangQuery is still broken, but now it breaks in the same way as before.
While we're here, set the correct param in one of the multilang tests. Not that
it matters.
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
The Column class accepts a 'doc' argument. Use it.
And while we're at it, make them all unicode strings.
Performed by the following sed script:
s/info=dict(description=u\?\("[^"]*"\))/doc=u\1/
s/info=dict(description=u\?\('[^']*'\))/doc=u\1/
s/\(\s*\)info=dict(description=u\?\("[^"]*"\), /\1doc=u\2,\n\1info=dict(/
s/\(\s*\)info=dict(description=u\?\('[^']*'\), /\1doc=u\2,\n\1info=dict(/
/info=dict(description=u\?\('[^']*'\),$/ {
s//doc=u\1,/
n
s/^\s*/&info=dict(/
}
- the Session has a `pokedex_link_maker` property, whose `object_url`
method is used to make URLs in Markdown
- pokemon.names_table.name is now an ordinary Unicode column
- pokemon.name is a MarkdownString that is aware of the session and the
language the string is in
- pokemon.name_map is a dict-like association_proxy of the above
- move.effect works similarly, with transparent $effect_chance substitution
as before
- Helper base class: Named
Subclasses: OfficiallyNamed, UnofficiallyNamed
for these, a 'name' column is created in the appropriate text table
also, they get automatic __str__/__repr__/__unicode__
- Faux columns: ProseColumn, TextColumn
these become columns in the appropriate text tables
these text tables (*_text, *_prose) are auto-generated at the end
the main table gets one property (singular name) that gets the English text
and one (plural name) with dict of texts keyed by language
- Every named table gets 'identifier'
- Languages compare & hash equal to their identifiers
- Existing foreign-name tables replaced by the autogenerated ones
- order_by: names replaced by identifiers
- New function: all_tables(), yields all tables
- Markdown move properties removed for now
- Schema test suite