Move NEWIMPORT into config
Fix test_PokerStars test to catch exception when importing with the legacy importer
This commit is contained in:
parent
152933ed49
commit
36dda2174b
|
@ -99,7 +99,7 @@ class Importer:
|
|||
for i in xrange(self.settings['threads']):
|
||||
self.writerdbs.append( Database.Database(self.config, sql = self.sql) )
|
||||
|
||||
self.NEWIMPORT = False
|
||||
self.NEWIMPORT = Configuration.NEWIMPORT
|
||||
|
||||
#Set functions
|
||||
def setCallHud(self, value):
|
||||
|
|
|
@ -97,7 +97,11 @@ def testStudImport():
|
|||
(stored, dups, partial, errs, ttime) = importer.runImport()
|
||||
importer.clearFileList()
|
||||
|
||||
# Should actually do some testing here
|
||||
assert 1 == 1
|
||||
|
||||
def testDrawImport():
|
||||
try:
|
||||
db.recreate_tables()
|
||||
importer = fpdb_import.Importer(False, settings, config)
|
||||
importer.setDropIndexes("don't drop")
|
||||
|
@ -110,3 +114,12 @@ def testDrawImport():
|
|||
importer.setCallHud(False)
|
||||
(stored, dups, partial, errs, ttime) = importer.runImport()
|
||||
importer.clearFileList()
|
||||
except FpdbError:
|
||||
if Configuration.NEWIMPORT == False:
|
||||
#Old import code doesn't support draw
|
||||
pass
|
||||
else:
|
||||
assert 0 == 1
|
||||
|
||||
# Should actually do some testing here
|
||||
assert 1 == 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user