diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2013-02-08 15:40:13 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2013-02-08 15:40:13 +0000 |
commit | 6cdf52cca1f613ec1b9c265687fd333adadcf606 (patch) | |
tree | 9d208f843fe10e226a5aa492a191f26ff435dfb0 /tests | |
parent | Allow running tests from everywhere (diff) | |
download | java-config-6cdf52cca1f613ec1b9c265687fd333adadcf606.tar.gz java-config-6cdf52cca1f613ec1b9c265687fd333adadcf606.tar.bz2 java-config-6cdf52cca1f613ec1b9c265687fd333adadcf606.zip |
Drop EnvironmentManager singlton hack and so really fix VersionManager to not lock on the active JVM. #402315
svn path=/projects/java-config-2/trunk/; revision=9182
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testsuite/VersionManager.py | 7 | ||||
-rw-r--r-- | tests/testsuite2/VersionManager.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/testsuite/VersionManager.py b/tests/testsuite/VersionManager.py index c5c69bd..4c9d1a5 100644 --- a/tests/testsuite/VersionManager.py +++ b/tests/testsuite/VersionManager.py @@ -1,10 +1,11 @@ import unittest import os from java_config_2.VersionManager import VersionManager -from java_config_2.EnvironmentManager import EnvironmentManager as em +from java_config_2.EnvironmentManager import EnvironmentManager class TestVersionManager(unittest.TestCase): - verman = VersionManager() + envman = EnvironmentManager() + verman = VersionManager(envman) def setUp(self): self.example_dep_vanilla = ">=virtual/jdk-1.5* dev-java/ant-core java-virtuals/jaf" @@ -49,7 +50,7 @@ class TestVersionManager(unittest.TestCase): self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch) def test_version_satisfies(self): - vm = em.get_vm('sun-jdk-1.6') + vm = self.envman.get_vm('sun-jdk-1.6') self.assertTrue(self.verman.version_satisfies('>=virtual/jdk-1.5', vm)) self.assertFalse(self.verman.version_satisfies('>=virtual/jdk-1.7', vm)) self.assertTrue(self.verman.version_satisfies('|| ( =virtual/jdk-1.6 =virtual/jdk-1.5 )', vm)) diff --git a/tests/testsuite2/VersionManager.py b/tests/testsuite2/VersionManager.py index c578dc1..3b5b3ac 100644 --- a/tests/testsuite2/VersionManager.py +++ b/tests/testsuite2/VersionManager.py @@ -1,10 +1,10 @@ import unittest import os from java_config_2.VersionManager import VersionManager -from java_config_2.EnvironmentManager import EnvironmentManager as em +from java_config_2.EnvironmentManager import EnvironmentManager class TestVersionManager(unittest.TestCase): - verman = VersionManager() + verman = VersionManager(EnvironmentManager()) def test_get_vm(self): vm = self.verman.get_vm("virtual/jdk:1.6 java-virtuals/jdk-with-com-sun dev-java/ant-contrib:0 app-arch/xz-utils >=dev-java/java-config-2.1.9-r1 source? ( app-arch/zip ) >=dev-java/ant-core-1.7.0 dev-java/ant-nodeps >=dev-java/javatoolkit-0.3.0-r2 >=dev-lang/python-2.4") |