This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test code for postgresql but not enabled, psycopg2 is not esay to…
… install
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -480,5 +480,49 @@ def setUpClass(self): | |
def tearDownClass(self): | ||
del self.resultdb | ||
|
||
|
||
#@unittest.skipIf(os.environ.get('IGNORE_POSTGRESQL'), 'no postgresql server for test.') | ||
#class TestPGTaskDB(TaskDBCase, unittest.TestCase): | ||
|
||
#@classmethod | ||
#def setUpClass(self): | ||
#self.taskdb = database.connect_database( | ||
#'sqlalchemy+postgresql+taskdb://[email protected]:5432/pyspider_test_taskdb' | ||
#) | ||
|
||
#@classmethod | ||
#def tearDownClass(self): | ||
#self.taskdb._execute('DROP DATABASE pyspider_test_taskdb') | ||
|
||
|
||
#@unittest.skipIf(os.environ.get('IGNORE_POSTGRESQL'), 'no postgresql server for test.') | ||
#class TestPGProjectDB(ProjectDBCase, unittest.TestCase): | ||
|
||
|
||
#@classmethod | ||
#def setUpClass(self): | ||
#self.projectdb = database.connect_database( | ||
#'sqlalchemy+postgresql+taskdb://[email protected]:5432/pyspider_test_projectdb' | ||
#) | ||
|
||
#@classmethod | ||
#def tearDownClass(self): | ||
#self.projectdb._execute('DROP DATABASE pyspider_test_projectdb') | ||
|
||
|
||
#@unittest.skipIf(os.environ.get('IGNORE_POSTGRESQL'), 'no postgresql server for test.') | ||
#class TestPGResultDB(ResultDBCase, unittest.TestCase): | ||
|
||
#@classmethod | ||
#def setUpClass(self): | ||
#self.resultdb = database.connect_database( | ||
#'sqlalchemy+postgresql+taskdb://[email protected]:5432/pyspider_test_resultdb' | ||
#) | ||
|
||
#@classmethod | ||
#def tearDownClass(self): | ||
#self.resultdb._execute('DROP DATABASE pyspider_test_resultdb') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |