mirror of
https://github.com/samba-team/samba.git
synced 2025-01-07 17:18:11 +03:00
a001b03854
Also, update to latest upstream version. Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
24 lines
880 B
Python
24 lines
880 B
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
import os
|
|
import unittest
|
|
|
|
import pep8
|
|
|
|
|
|
class UtilTestCase(unittest.TestCase):
|
|
def test_normalize_paths(self):
|
|
cwd = os.getcwd()
|
|
|
|
self.assertEqual(pep8.normalize_paths(''), [])
|
|
self.assertEqual(pep8.normalize_paths([]), [])
|
|
self.assertEqual(pep8.normalize_paths(None), [])
|
|
self.assertEqual(pep8.normalize_paths(['foo']), ['foo'])
|
|
self.assertEqual(pep8.normalize_paths('foo'), ['foo'])
|
|
self.assertEqual(pep8.normalize_paths('foo,bar'), ['foo', 'bar'])
|
|
self.assertEqual(pep8.normalize_paths('foo, bar '), ['foo', 'bar'])
|
|
self.assertEqual(pep8.normalize_paths('/foo/bar,baz/../bat'),
|
|
['/foo/bar', cwd + '/bat'])
|
|
self.assertEqual(pep8.normalize_paths(".pyc,\n build/*"),
|
|
['.pyc', cwd + '/build/*'])
|