* [gentoo-commits] proj/layman:master commit in: layman/tests/
2014-06-16 3:37 [gentoo-commits] proj/layman:gsoc2014 " Brian Dolbec
@ 2014-06-16 3:40 ` Brian Dolbec
0 siblings, 0 replies; 17+ messages in thread
From: Brian Dolbec @ 2014-06-16 3:40 UTC (permalink / raw
To: gentoo-commits
commit: d161e4fb9e41cdc841adb40b86ab6cbb5b01a0a2
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 12 21:39:26 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Jun 15 00:36:41 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=d161e4fb
external.py: Adds py3 compatibility to tests
Adds py3 urllib imports, print function updates, and implicit
utf-8 decoding of test strings.
---
layman/tests/external.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 82825e2..5882270 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -15,11 +15,15 @@
#
'''Runs external (non-doctest) test cases.'''
-import unittest
import os
-import tempfile
import shutil
-import urllib
+import tempfile
+import unittest
+#Py3
+try:
+ import urllib.request as urllib
+except ImportError:
+ import urllib
from layman.dbbase import DbBase
from layman.output import Message
from layman.config import BareConfig
@@ -35,8 +39,8 @@ class Unicode(unittest.TestCase):
o = DbBase(config, [filename])
for verbose in (True, False):
for t in o.list(verbose=verbose):
- print t[0]
- print
+ print(t[0].decode('utf-8'))
+ print()
def test_184449(self):
self._overlays_bug(184449)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-11-02 3:15 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-11-02 3:15 UTC (permalink / raw
To: gentoo-commits
commit: 0481082b1f8d53ee175567e37e9d0efaf1717c02
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 28 17:15:21 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 2 03:14:47 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=0481082b
external.py: Spelling correction for header
---
layman/tests/external.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 21ad029..1aceca6 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#################################################################################
-# EXTENRAL LAYMAN TESTS
+# EXTERNAL LAYMAN TESTS
#################################################################################
# File: external.py
#
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-12-03 19:08 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-12-03 19:08 UTC (permalink / raw
To: gentoo-commits
commit: b61bee7bf4658940147cba1d7ed0dfbeb1a49696
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 02:57:32 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 02:57:36 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=b61bee7b
external.py: Adds archive overlay test checking
A test has been added to ensure we only test the archive overlay
types that the user has installed on their system.
---
layman/tests/external.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 1aceca6..64f48d2 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -194,7 +194,16 @@ class ArchiveAddRemoveSync(unittest.TestCase):
def test(self):
- for archive in ('squashfs', 'tar'):
+ archives = []
+ try:
+ from layman.overlays.modules.tar.tar import TarOverlay
+ archives.append('tar')
+ from layman.overlays.modules.squashfs.squashfs import SquashfsOverlay
+ archives.append('squashfs')
+ except ImportError:
+ pass
+
+ for archive in archives:
xml_text, repo_name, temp_archive_path = getattr(self,
"_create_%(archive)s_overlay" %
{'archive': archive})()
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-12-03 19:08 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-12-03 19:08 UTC (permalink / raw
To: gentoo-commits
commit: c7e394dc49ee26fe52012befa30e08ce91270377
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 03:28:12 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 04:44:17 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=c7e394dc
external.py: Converts all assertEquals calls to assertEqual
As the assertEquals call is being deprecated, all of its calls must
be converted to assertEqual.
---
layman/tests/external.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 64f48d2..e20baaa 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -645,7 +645,7 @@ class RemoteDBCache(unittest.TestCase):
}
config = OptionConfig(my_opts)
db = RemoteDB(config)
- self.assertEquals(db.cache(), (True, True))
+ self.assertEqual(db.cache(), (True, True))
db_xml = fileopen(db.filepath(config['overlays']) + '.xml')
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-12-03 19:08 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-12-03 19:08 UTC (permalink / raw
To: gentoo-commits
commit: 561623c9edcf1b7890dee4a9eaf808774a05db26
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 06:06:26 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 06:06:26 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=561623c9
external.py: Modifies tested flags to reflect new config options
---
layman/tests/external.py | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 70d5b62..695decc 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -241,17 +241,18 @@ class CLIArgs(unittest.TestCase):
a = ArgsParser()
test_url = 'https://api.gentoo.org/overlays/repositories.xml'
self.assertTrue(test_url in a['overlays'].split('\n'))
+
test_keys = ['auto_sync', 'bzr_addopts', 'bzr_command', 'bzr_postsync',
- 'bzr_syncopts', 'cache', 'clean_tar', 'conf_module',
- 'conf_type', 'config', 'configdir', 'custom_news_pkg',
- 'cvs_addopts', 'cvs_command', 'cvs_postsync',
- 'cvs_syncopts', 'darcs_addopts', 'darcs_command',
- 'darcs_postsync', 'darcs_syncopts', 'g-common_command',
- 'g-common_generateopts', 'g-common_postsync',
- 'g-common_syncopts', 'g-sorcery_command',
- 'g-sorcery_generateopts', 'g-sorcery_postsync',
- 'g-sorcery_syncopts', 'git_addopts', 'git_command',
- 'git_email', 'git_postsync', 'git_syncopts',
+ 'bzr_syncopts', 'cache', 'check_official', 'clean_archive',
+ 'conf_module', 'conf_type', 'config', 'configdir',
+ 'custom_news_pkg', 'cvs_addopts', 'cvs_command',
+ 'cvs_postsync', 'cvs_syncopts', 'darcs_addopts',
+ 'darcs_command', 'darcs_postsync', 'darcs_syncopts',
+ 'g-common_command', 'g-common_generateopts',
+ 'g-common_postsync', 'g-common_syncopts',
+ 'g-sorcery_command', 'g-sorcery_generateopts',
+ 'g-sorcery_postsync', 'g-sorcery_syncopts', 'git_addopts',
+ 'git_command', 'git_email', 'git_postsync', 'git_syncopts',
'git_user', 'gpg_detached_lists', 'gpg_signed_lists',
'http_proxy', 'https_proxy', 'installed', 'local_list',
'make_conf', 'mercurial_addopts', 'mercurial_command',
@@ -259,6 +260,8 @@ class CLIArgs(unittest.TestCase):
'news_reporter', 'nocheck', 'overlay_defs', 'overlays',
'quietness', 'repos_conf', 'require_repoconfig',
'rsync_command', 'rsync_postsync', 'rsync_syncopts',
+ 'squashfs_addopts', 'squashfs_command',
+ 'squashfs_postsync', 'squashfs_syncopts',
'storage', 'support_url_updates', 'svn_addopts',
'svn_command', 'svn_postsync', 'svn_syncopts',
't/f_options', 'tar_command', 'tar_postsync', 'umask',
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-12-03 19:08 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-12-03 19:08 UTC (permalink / raw
To: gentoo-commits
commit: 6236bd0dbeb638c0c67c3e32a247eb55b000e3b8
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 06:20:17 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 06:20:17 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=6236bd0d
external.py: Modifies XML line testing in MakeOverlayXML class
To make this testing more compliant with both py2.7 and py3.x the
method in which the test suit tested the lines in the made XML
needed to be changed as py2.7 adds the XML header when reading in
the XML test file.
---
layman/tests/external.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 695decc..ad630e6 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -444,7 +444,7 @@ class MakeOverlayXML(unittest.TestCase):
with fileopen(path, 'r') as xml:
test_line = ' <source type="svn">'\
'https://overlays.gentoo.org/svn/dev/wrobel</source>\n'
- self.assertEqual(xml.readlines()[9], test_line)
+ self.assertTrue(test_line in xml.readlines())
for line in xml.readlines():
print(line, end='')
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-12-03 19:08 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-12-03 19:08 UTC (permalink / raw
To: gentoo-commits
commit: c84e88abaa0aff6bf7c41c2aea8ca09cf98cb4c2
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 04:19:37 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 04:44:33 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=c84e88ab
external.py: Improves success checking in AddDeleteEnableDisableFromDB
---
layman/tests/external.py | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index e20baaa..45b4d39 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -89,31 +89,20 @@ class AddDeleteEnableDisableFromDB(unittest.TestCase):
# Add all the overlays in global_overlays.xml.
for overlay in a.overlays.keys():
conf_success = conf.add(a.overlays[overlay])
- if False in conf_success:
+ if conf_success == False:
success.append(False)
else:
success.append(True)
# Disable one overlay.
- conf_success = conf.disable(a.overlays['wrobel'])
- if False in conf_success:
- success.append(False)
- else:
- success.append(True)
+ self.assertTrue(conf.disable(a.overlays['wrobel']))
# Enable disabled overlay.
- conf_success = conf.enable(a.overlays['wrobel'])
- if False in conf_success:
- success.append(False)
- else:
- success.append(True)
+ self.assertTrue(conf.enable(a.overlays['wrobel']))
+
# Delete all the overlays in global_overlays.xml.
for overlay in a.overlays.keys():
- conf_success = conf.delete(a.overlays[overlay])
- if False in conf_success:
- success.append(False)
- else:
- success.append(True)
+ self.assertTrue(conf.delete(a.overlays[overlay]))
# Clean up.
os.unlink(makeconf)
@@ -121,13 +110,6 @@ class AddDeleteEnableDisableFromDB(unittest.TestCase):
shutil.rmtree(tmpdir)
- if False in success:
- success = False
- else:
- success = True
-
- self.assertTrue(success)
-
# Tests archive overlay types (squashfs, tar)
# http://bugs.gentoo.org/show_bug.cgi?id=304547
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2014-12-03 19:08 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2014-12-03 19:08 UTC (permalink / raw
To: gentoo-commits
commit: ad249e2fb0bf3a4ba3265e2f7f4d3cf3c34ab41b
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 04:56:47 2014 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 04:56:47 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=ad249e2f
external.py: Improves CLIArgs testing for a["overlays"]
---
layman/tests/external.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 45b4d39..70d5b62 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -239,8 +239,8 @@ class CLIArgs(unittest.TestCase):
# Test the passed in cli opts on the ArgsParser class:
a = ArgsParser()
- test_url = '\n\nhttps://api.gentoo.org/overlays/repositories.xml'
- self.assertEqual(a['overlays'], test_url)
+ test_url = 'https://api.gentoo.org/overlays/repositories.xml'
+ self.assertTrue(test_url in a['overlays'].split('\n'))
test_keys = ['auto_sync', 'bzr_addopts', 'bzr_command', 'bzr_postsync',
'bzr_syncopts', 'cache', 'clean_tar', 'conf_module',
'conf_type', 'config', 'configdir', 'custom_news_pkg',
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-03-27 20:50 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-03-27 20:50 UTC (permalink / raw
To: gentoo-commits
commit: 18e0e25f18745a507a25b175986b855e0ec996a9
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 27 20:50:17 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Fri Mar 27 20:50:17 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=18e0e25f
external.py: Adds protocol_filter to keys to test for CLIArgs test
layman/tests/external.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index ad630e6..d9ef858 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -258,14 +258,13 @@ class CLIArgs(unittest.TestCase):
'make_conf', 'mercurial_addopts', 'mercurial_command',
'mercurial_postsync', 'mercurial_syncopts',
'news_reporter', 'nocheck', 'overlay_defs', 'overlays',
- 'quietness', 'repos_conf', 'require_repoconfig',
- 'rsync_command', 'rsync_postsync', 'rsync_syncopts',
- 'squashfs_addopts', 'squashfs_command',
- 'squashfs_postsync', 'squashfs_syncopts',
- 'storage', 'support_url_updates', 'svn_addopts',
- 'svn_command', 'svn_postsync', 'svn_syncopts',
- 't/f_options', 'tar_command', 'tar_postsync', 'umask',
- 'width']
+ 'protocol_filter', 'quietness', 'repos_conf',
+ 'require_repoconfig', 'rsync_command', 'rsync_postsync',
+ 'rsync_syncopts', 'squashfs_addopts', 'squashfs_command',
+ 'squashfs_postsync', 'squashfs_syncopts', 'storage',
+ 'support_url_updates', 'svn_addopts', 'svn_command',
+ 'svn_postsync', 'svn_syncopts', 't/f_options',
+ 'tar_command', 'tar_postsync', 'umask', 'width']
# Due to this not being a dict object, the keys() invocation is needed.
self.assertEqual(sorted(a.keys()), test_keys)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-03-27 21:38 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-03-27 21:38 UTC (permalink / raw
To: gentoo-commits
commit: 7011c1ec70ad98f818f3fc7b549c3dae8f5ad1da
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 27 21:37:58 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Fri Mar 27 21:37:58 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=7011c1ec
external.py: Adds __future__ import for unicode_literals
layman/tests/external.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index d9ef858..64a4263 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -15,6 +15,7 @@
#
from __future__ import print_function
+from __future__ import unicode_literals
'''Runs external (non-doctest) test cases.'''
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-03-27 22:03 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-03-27 22:03 UTC (permalink / raw
To: gentoo-commits
commit: c782c43b14d71766ed22b9eb39c6bd5bec9a264c
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 27 22:02:48 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Fri Mar 27 22:02:51 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=c782c43b
external.py: Attempts to set default string encoding to utf-8
X-Gentoo-Bug: 539416
X-Gentoo-Bug-URL: https://bugs.gentoo.org/539416
layman/tests/external.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 64a4263..eaa3510 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -45,6 +45,12 @@ from layman.repoconfmanager import RepoConfManager
from layman.utils import path
from warnings import filterwarnings, resetwarnings
+encoding = sys.getdefaultencoding()
+
+if encoding != 'utf-8':
+ reload(sys)
+ sys.setdefaultencoding('utf-8')
+
HERE = os.path.dirname(os.path.realpath(__file__))
class AddDeleteEnableDisableFromDB(unittest.TestCase):
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-06-16 1:30 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-06-16 1:30 UTC (permalink / raw
To: gentoo-commits
commit: acf5162dc04352e1a4f2b6719157e5bedc7fb2fc
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 16 01:28:18 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Tue Jun 16 01:29:01 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=acf5162d
external.py: Renames test function to more appropriate name
Renames AddDeleteEnableDisableFromDB to AddDeleteEnableDisableFromConf
as the test is mainly testing the functionality of the conf files,
not the database classes.
layman/tests/external.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index eaa3510..713923b 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -53,7 +53,7 @@ if encoding != 'utf-8':
HERE = os.path.dirname(os.path.realpath(__file__))
-class AddDeleteEnableDisableFromDB(unittest.TestCase):
+class AddDeleteEnableDisableFromConf(unittest.TestCase):
def test(self):
tmpdir = tempfile.mkdtemp(prefix='laymantmp_')
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-07-09 16:18 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-07-09 16:18 UTC (permalink / raw
To: gentoo-commits
commit: 0099095fd231d70b3f7e21bd7df7cbdac3c13d90
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 9 15:29:20 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Thu Jul 9 15:29:20 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=0099095f
external.py: Adds db_type to list of test config keys
layman/tests/external.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index f8bcc8c..97bd6ee 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -345,7 +345,7 @@ class CLIArgs(unittest.TestCase):
'custom_news_pkg', 'cvs_addopts', 'cvs_command',
'cvs_postsync', 'cvs_syncopts', 'darcs_addopts',
'darcs_command', 'darcs_postsync', 'darcs_syncopts',
- 'g-common_command', 'g-common_generateopts',
+ 'db_type', 'g-common_command', 'g-common_generateopts',
'g-common_postsync', 'g-common_syncopts',
'g-sorcery_command', 'g-sorcery_generateopts',
'g-sorcery_postsync', 'g-sorcery_syncopts', 'git_addopts',
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-07-09 17:19 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-07-09 17:19 UTC (permalink / raw
To: gentoo-commits
commit: 218a9cbf948a70d852d1fe0e22322003d2f0b6dd
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 9 17:20:20 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Thu Jul 9 17:20:20 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=218a9cbf
external.py: Adds db_type to configs for DbBase tests
layman/tests/external.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 97bd6ee..e2a44b0 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -637,6 +637,7 @@ class ReadWriteSelectListDbBase(unittest.TestCase):
output = Message()
config = {
'output': output,
+ 'db_type': 'xml',
'svn_command': '/usr/bin/svn',
'rsync_command':'/usr/bin/rsync'
}
@@ -670,7 +671,8 @@ class ReadWriteSelectListDbBase(unittest.TestCase):
def read_db(self):
output = Message()
- config = {'output': output}
+ config = {'output': output,
+ 'db_type': 'xml',}
db = DbBase(config, [HERE + '/testfiles/global-overlays.xml', ])
keys = sorted(db.overlays)
self.assertEqual(keys, ['wrobel', 'wrobel-stable'])
@@ -681,7 +683,8 @@ class ReadWriteSelectListDbBase(unittest.TestCase):
def select_db(self):
output = Message()
- config = {'output': output}
+ config = {'output': output,
+ 'db_type': 'xml',}
db = DbBase(config, [HERE + '/testfiles/global-overlays.xml', ])
url = ['rsync://gunnarwrobel.de/wrobel-stable']
self.assertEqual(list(db.select('wrobel-stable').source_uris()), url)
@@ -691,13 +694,14 @@ class ReadWriteSelectListDbBase(unittest.TestCase):
tmpdir = tempfile.mkdtemp(prefix='laymantmp_')
test_xml = os.path.join(tmpdir, 'test.xml')
config = BareConfig()
+
a = DbBase(config, [HERE + '/testfiles/global-overlays.xml', ])
- b = DbBase({'output': Message()}, [test_xml,])
+ b = DbBase({'output': Message(), 'db_type': 'xml'}, [test_xml,])
b.overlays['wrobel-stable'] = a.overlays['wrobel-stable']
b.write(test_xml)
- c = DbBase({'output': Message()}, [test_xml,])
+ c = DbBase({'output': Message(), 'db_type': 'xml'}, [test_xml,])
keys = sorted(c.overlays)
self.assertEqual(keys, ['wrobel-stable'])
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-07-14 13:31 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-07-14 13:31 UTC (permalink / raw
To: gentoo-commits
commit: 7428f47c435073a929f9a41f72a6bd8a675b631e
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 14 13:30:16 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Tue Jul 14 13:30:37 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=7428f47c
external.py: Adds db_type config option to tests which need it
The Overlay, DbBase, and DB would require the db_type config option
to be set. To prevent it from falling back on config option defaults
it's best to specify it.
layman/tests/external.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 0dad278..3e41bd1 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -154,6 +154,7 @@ class AddDeleteDB(unittest.TestCase):
my_opts = {'installed' : temp_xml_path,
'conf_type' : ['make.conf', 'repos.conf'],
+ 'db_type' : 'xml_db',
'nocheck' : 'yes',
'make_conf' : make_conf,
'repos_conf' : repo_conf,
@@ -480,6 +481,7 @@ class FormatBranchCategory(unittest.TestCase):
def _run(self, number):
#config = {'output': Message()}
config = BareConfig()
+
# Discuss renaming files to "branch-%d.xml"
filename1 = os.path.join(HERE, 'testfiles',
'subpath-%d.xml' % number)
@@ -554,7 +556,7 @@ class OverlayObjTest(unittest.TestCase):
overlays = document.findall('overlay') + document.findall('repo')
output = Message()
- ovl_a = Overlay({'output': output}, overlays[0])
+ ovl_a = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[0])
self.assertEqual(ovl_a.name, 'wrobel')
self.assertEqual(ovl_a.is_official(), True)
url = ['https://overlays.gentoo.org/svn/dev/wrobel']
@@ -563,7 +565,7 @@ class OverlayObjTest(unittest.TestCase):
self.assertEqual(ovl_a.descriptions, ['Test'])
self.assertEqual(ovl_a.priority, 10)
- ovl_b = Overlay({'output': output}, overlays[1])
+ ovl_b = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[1])
self.assertEqual(ovl_b.is_official(), False)
@@ -572,7 +574,7 @@ class OverlayObjTest(unittest.TestCase):
overlays = document.findall('overlay') + document.findall('repo')
output = Message()
- ovl = Overlay({'output': output}, overlays[0])
+ ovl = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[0])
test_infostr = 'wrobel\n~~~~~~\nSource : '\
'https://overlays.gentoo.org/svn/dev/wrobel\nContact '\
': nobody@gentoo.org\nType : Subversion; Priority: '\
@@ -586,7 +588,7 @@ class OverlayObjTest(unittest.TestCase):
overlays = document.findall('overlay') + document.findall('repo')
output = Message()
- ovl = Overlay({'output': output}, overlays[0])
+ ovl = Overlay({'output': output, 'db_type': 'xml_db'}, xml=overlays[0])
test_short_list = 'wrobel [Subversion] '\
'(https://o.g.o/svn/dev/wrobel )'
self.assertEqual(ovl.short_list(80).decode('utf-8'), test_short_list)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2015-07-14 13:31 Devan Franchini
0 siblings, 0 replies; 17+ messages in thread
From: Devan Franchini @ 2015-07-14 13:31 UTC (permalink / raw
To: gentoo-commits
commit: c8783443cc42d4254d4b2a71796202495487fe0f
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 14 13:32:33 2015 +0000
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Tue Jul 14 13:32:33 2015 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=c8783443
external.py: Modifies ovl_dict keys to conform to new changes
layman/tests/external.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index 3e41bd1..01cf5b3 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -522,11 +522,11 @@ class MakeOverlayXML(unittest.TestCase):
ovl_dict = {
'name': 'wrobel',
- 'descriptions': ['Test'],
+ 'description': ['Test'],
'owner_name': 'nobody',
'owner_email': 'nobody@gentoo.org',
'status': 'official',
- 'sources': [['https://overlays.gentoo.org/svn/dev/wrobel',
+ 'source': [['https://overlays.gentoo.org/svn/dev/wrobel',
'svn', '']],
'priority': '10',
}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] proj/layman:master commit in: layman/tests/
@ 2020-04-24 20:59 Brian Dolbec
0 siblings, 0 replies; 17+ messages in thread
From: Brian Dolbec @ 2020-04-24 20:59 UTC (permalink / raw
To: gentoo-commits
commit: c381b3ff58236f4243bfec6eb206cbee968d8779
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 24 12:33:00 2020 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Apr 24 13:54:16 2020 +0000
URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=c381b3ff
test/external.py: Remove __future__ imports
Remove unused resetwarnings() call since unittest.main() does a sys.exit()
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
layman/tests/external.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/layman/tests/external.py b/layman/tests/external.py
index f2b18cd..e6f408d 100755
--- a/layman/tests/external.py
+++ b/layman/tests/external.py
@@ -14,9 +14,6 @@
# Sebastian Pipping <sebastian@pipping.org>
#
-from __future__ import print_function
-from __future__ import unicode_literals
-
'''Runs external (non-doctest) test cases.'''
import os
@@ -452,7 +449,7 @@ class FetchRemoteList(unittest.TestCase):
available = api.get_available()
self.assertEqual(available, ['wrobel', 'wrobel-stable'])
-
+
# Test the info of an overlay.
info = api.get_info_str(['wrobel'], verbose=True, local=False)
test_info = 'wrobel\n~~~~~~\nSource : https://overlays.gentoo.org'\
@@ -769,4 +766,3 @@ class RemoteDBCache(unittest.TestCase):
if __name__ == '__main__':
filterwarnings('ignore')
unittest.main()
- resetwarnings()
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2020-04-24 20:59 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-27 21:38 [gentoo-commits] proj/layman:master commit in: layman/tests/ Devan Franchini
-- strict thread matches above, loose matches on Subject: below --
2020-04-24 20:59 Brian Dolbec
2015-07-14 13:31 Devan Franchini
2015-07-14 13:31 Devan Franchini
2015-07-09 17:19 Devan Franchini
2015-07-09 16:18 Devan Franchini
2015-06-16 1:30 Devan Franchini
2015-03-27 22:03 Devan Franchini
2015-03-27 20:50 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-12-03 19:08 Devan Franchini
2014-11-02 3:15 Devan Franchini
2014-06-16 3:37 [gentoo-commits] proj/layman:gsoc2014 " Brian Dolbec
2014-06-16 3:40 ` [gentoo-commits] proj/layman:master " Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox