1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
samba-mirror/third_party/pep8/testsuite/test_util.py
Jelmer Vernooij a001b03854 pep8: Move to third_party/.
Also, update to latest upstream version.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-04-27 21:18:10 +02:00

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/*'])