Skip to content

Commit

Permalink
Make tests run with namespace structure
Browse files Browse the repository at this point in the history
Make subunit search for tests in the namespace, to avoid the error of
attempting to import relatively beyond top level package. Also, use
relative import in tests.
  • Loading branch information
balasankarc committed Jul 9, 2016
1 parent fdfbd8c commit 2c6cfee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .testr.conf
@@ -1,4 +1,4 @@
[DEFAULT]
test_command=${PYTHON:-python} -m subunit.run discover libindic/spellchecker $LISTOPT $IDOPTION
test_command=${PYTHON:-python} -m subunit.run discover libindic $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
5 changes: 3 additions & 2 deletions libindic/spellchecker/tests/tests_spellchecker.py
Expand Up @@ -3,16 +3,17 @@

import collections

from libindic import spellchecker
from libindic.stemmer import Malayalam as stemmer
from testtools import TestCase

from .. import Malayalam as spellchecker


class MalayalamSpellcheckerTest(TestCase):

def setUp(self):
super(MalayalamSpellcheckerTest, self).setUp()
self.spellchecker = spellchecker.Malayalam()
self.spellchecker = spellchecker()
self.stemmer = stemmer()
self.verbosity = False

Expand Down

0 comments on commit 2c6cfee

Please sign in to comment.