Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(605)

Unified Diff: tests/dependencies.py

Issue 317610043: [plaso] Changed dependency management to use configuration file (Closed)
Patch Set: Changed dependency management to use configuration file Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « setup.py ('k') | utils/check_dependencies.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/dependencies.py
diff --git a/tests/dependencies.py b/tests/dependencies.py
deleted file mode 100644
index 79a6742bca4a499e2066bff86e1828f219cd9d71..0000000000000000000000000000000000000000
--- a/tests/dependencies.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-"""Tests for the dependencies helper functions."""
-
-import unittest
-
-from plaso import dependencies
-
-
-class DependenciesTest(unittest.TestCase):
- """A unit test for the dependencies helper functions."""
-
- # pylint: disable=protected-access
-
- # Show full diff results, part of TestCase so does not follow our naming
- # conventions.
- maxDiff = None
-
- def testCheckPythonModule(self):
- """Tests the _CheckPythonModule function."""
- result = dependencies._CheckPythonModule(
- u'dfdatetime', u'__version__', u'20160319', verbose_output=False)
- self.assertTrue(result)
-
- result = dependencies._CheckPythonModule(
- u'bogus', u'__version__', u'0', verbose_output=False)
- self.assertFalse(result)
-
- def testCheckSQLite3(self):
- """Tests the _CheckSQLite3 function."""
- result = dependencies._CheckSQLite3(verbose_output=False)
- self.assertTrue(result)
-
- def testImportPythonModule(self):
- """Tests the _ImportPythonModule function."""
- module = dependencies._ImportPythonModule(u'os')
- self.assertIsNotNone(module)
-
- module = dependencies._ImportPythonModule(u'bogus')
- self.assertIsNone(module)
-
- def testCheckDependencies(self):
- """Tests the CheckDependencies function."""
- result = dependencies.CheckDependencies(verbose_output=False)
- self.assertTrue(result)
-
- def testCheckModuleVersion(self):
- """Tests the CheckModuleVersion function."""
- dependencies.CheckModuleVersion(u'dfdatetime')
-
- dependencies.CheckModuleVersion(u'pyregf')
-
- dependencies.CheckModuleVersion(u'os')
-
- with self.assertRaises(ImportError):
- dependencies.CheckModuleVersion(u'bogus')
-
- def testCheckTestDependencies(self):
- """Tests the CheckTestDependencies function."""
- result = dependencies.CheckTestDependencies(verbose_output=False)
- self.assertTrue(result)
-
- def testGetDPKGDepends(self):
- """Tests the GetDPKGDepends function."""
- install_requires = dependencies.GetDPKGDepends()
- self.assertIn(u'libbde-python (>= 20140531)', install_requires)
-
- install_requires = dependencies.GetDPKGDepends(exclude_version=True)
- self.assertIn(u'libbde-python', install_requires)
-
- def testGetInstallRequires(self):
- """Tests the GetInstallRequires function."""
- install_requires = dependencies.GetInstallRequires()
- self.assertIn(u'libbde-python >= 20140531', install_requires)
-
- def testGetRPMRequires(self):
- """Tests the GetRPMRequires function."""
- install_requires = dependencies.GetRPMRequires()
- self.assertIn(u'libbde-python >= 20140531', install_requires)
-
- install_requires = dependencies.GetRPMRequires(exclude_version=True)
- self.assertIn(u'libregf-python', install_requires)
-
-
-if __name__ == '__main__':
- unittest.main()
« no previous file with comments | « setup.py ('k') | utils/check_dependencies.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b