def test_site_packages_dir(self): """ should return the site packages path for the active virtual environment """ self.assertEqual(spec_helpers.site_packages_dir(), os.path.join( self.test_env, 'lib/python%s/site-packages' % sys.version[:3]))
def test_site_packages_dir_with_path_components(self): """ should return the site packages path for the active virtual environment joined with any relative path components """ a = 'foo/bar' b = 'biz/baz' self.assertEqual(spec_helpers.site_packages_dir(a, b), os.path.join( self.test_env, 'lib/python%s/site-packages' % sys.version[:3], a, b))