Drop pre-2.6 compat function koji.util._relpath

Fixes: https://pagure.io/koji/issue/818
This commit is contained in:
Tomas Kopecek 2018-02-26 15:59:07 +01:00 committed by Mike McLean
parent 22a7998f3a
commit 2eff45f763
6 changed files with 24 additions and 55 deletions

View file

@ -843,17 +843,6 @@ class MavenUtilTestCase(unittest.TestCase):
self.assertEqual('[value hidden]', str(hv2))
self.assertEqual('HiddenValue()', repr(hv2))
def test_relpath(self):
"""Test _relpath function"""
self.assertRaises(ValueError, koji.util._relpath, None)
self.assertRaises(ValueError, koji.util._relpath, "")
# _relpath is a backport of os.path.relpath
# their behaviors and outputs should be the same.
for p in ["/", ".", "..", "/bin", "\0", "\n", "\t/tmp"]:
for s in [os.curdir, '/tmp']:
self.assertEqual(os.path.relpath(p, s), koji.util._relpath(p, s))
def test_eventFromOpts(self):
"""Test eventFromOpts function"""
timestamp = datetime.now().strftime('%s')