kopia lustrzana https://github.com/micropython/micropython-lib
glob: Patch test_glob.py a bit.
bytes/str dichotomy and win32-specifics.pull/118/head
rodzic
3409396c10
commit
6e4d7ee145
|
@ -1,5 +1,6 @@
|
|||
import glob
|
||||
import os
|
||||
import os.path
|
||||
import shutil
|
||||
import sys
|
||||
import unittest
|
||||
|
@ -69,10 +70,10 @@ class GlobTests(unittest.TestCase):
|
|||
res = glob.glob(os.path.join(os.curdir, '*'))
|
||||
self.assertEqual({type(r) for r in res}, {str})
|
||||
|
||||
res = glob.glob(b'*')
|
||||
self.assertEqual({type(r) for r in res}, {bytes})
|
||||
res = glob.glob(os.path.join(os.fsencode(os.curdir), b'*'))
|
||||
self.assertEqual({type(r) for r in res}, {bytes})
|
||||
# res = glob.glob(b'*')
|
||||
# self.assertEqual({type(r) for r in res}, {bytes})
|
||||
# res = glob.glob(os.path.join(os.fsencode(os.curdir), b'*'))
|
||||
# self.assertEqual({type(r) for r in res}, {bytes})
|
||||
|
||||
def test_glob_one_directory(self):
|
||||
eq = self.assertSequencesEqual_noorder
|
||||
|
@ -157,8 +158,8 @@ class GlobTests(unittest.TestCase):
|
|||
eq(self.glob('sym1'), [self.norm('sym1')])
|
||||
eq(self.glob('sym2'), [self.norm('sym2')])
|
||||
|
||||
@unittest.skipUnless(sys.platform == "win32", "Win32 specific test")
|
||||
def test_glob_magic_in_drive(self):
|
||||
# @unittest.skipUnless(sys.platform == "win32", "Win32 specific test")
|
||||
def _test_glob_magic_in_drive(self):
|
||||
eq = self.assertSequencesEqual_noorder
|
||||
eq(glob.glob('*:'), [])
|
||||
eq(glob.glob(b'*:'), [])
|
||||
|
|
Ładowanie…
Reference in New Issue