Open GoogleCodeExporter opened 9 years ago
We are quite far away from 2.3.1 right now. Can you check with the SVN trunk,
please?
Original comment by esizi...@gmail.com
on 17 Nov 2010 at 4:47
I have no way to test the SVN trunk code right now, but I did browse through it
and noticed that djapian/tests/query.py hasn't been updated since the release
of 2.3.1 and the BaseIndexerTest and BaseTestCase classes in
djapian/tests/utils.py also haven't been updated since 2.3.1. Those two classes
are the ones used in the query_test() suite in djapian/tests/query.py, so
there's a very good chance the error is still present.
It looks to me like the following two lines at the bottom of
djapian/tests/query.py should be looking for 3 results to be returned, instead
of the 2 they are looking for now:
IndexerSearchCharFieldTest = query_test("title:test", 2)
IndexerSearchAliasFieldTest = query_test("subject:test", 2)
Original comment by clevelan...@gmail.com
on 17 Nov 2010 at 9:35
I had a time to look at the issue.
1. all unit tests are passed on my box, including djapian.tests.query.* series
2. IndexerSearchCharFieldTest = query_test("title:test", 2) and
IndexerSearchAliasFieldTest = query_test("subject:test", 2) tests expects 2 as
the result because there's no stemming has been enabled for these tests (see
EntryIndexer in tests/utils.py), so "testing" should not be a hit when
searching for "test".
I don't see a problem here.
Original comment by esizi...@gmail.com
on 19 Nov 2010 at 7:16
Ah, I see - I have "DJAPIAN_STEMMING_LANG = 'en'" in my settings.py file. So
that's what's causing the tests to fail on my end? If so, then that makes sense.
So I should be able to get the tests to pass by overriding
DJAPIAN_STEMMING_LANG to be None through a local settings file before the tests
are run?
If the answer to both of those questions is yes, then feel free to close this
issue, as I feel it's been cleared up. Thank you for the help and explanation!
Original comment by clevelan...@gmail.com
on 19 Nov 2010 at 2:23
I actually just checked - placing "DJAPIAN_STEMMING_LANG = None" in a local
settings file allows the tests to pass. Again, thanks for the explanation!
Perhaps in the future you can add some code to ensure that the tests will pass
regardless of whether DJAPIAN_STEMMING_LANG is defined or not. Stemming is a
useful feature for my project, so it would be nice to see the tests pass while
we're using it.
Original comment by clevelan...@gmail.com
on 19 Nov 2010 at 3:18
Original comment by daevaorn
on 19 Nov 2010 at 3:25
In r375 a temporary fix has been checked in. We might need a better solution
which would update Indexer._get_stem_language to detect somehow if it is a
testing session and just return 'none' if that is the case.
Original comment by esizi...@gmail.com
on 15 Dec 2010 at 1:59
Original issue reported on code.google.com by
clevelan...@gmail.com
on 10 Nov 2010 at 9:14