aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_elpa_db.py')
-rw-r--r--tests/test_elpa_db.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/test_elpa_db.py b/tests/test_elpa_db.py
new file mode 100644
index 0000000..dfbe34a
--- /dev/null
+++ b/tests/test_elpa_db.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ test_elpa_db.py
+ ~~~~~~~~~~~~~~~
+
+ ELPA package database test suite
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+import http.server, tempfile, threading, unittest
+
+from g_elpa import elpa_db
+
+class TestElpaDB(unittest.TestCase):
+ def setUp(self):
+ self.tempdir = tempfile.TemporaryDirectory()
+
+ def tearDown(self):
+ del self.tempdir
+
+ def test_generate(self):
+ edb = elpa_db.ElpaDB(self.tempdir.name, repo_uri = 'http://elpa.gnu.org/packages/')
+ edb.generate_tree()
+
+def suite():
+ suite = unittest.TestSuite()
+ suite.addTest(TestElpaDB('test_generate'))
+ return suite