Permalink
Browse files

More PEP-8 adaptations

- adapted method names
- adapted some formatting
- see #186
  • Loading branch information...
mrbean-bremen committed Dec 18, 2017
1 parent 7d08987 commit a0d0b22e85204dbd6946e356b804cb19beba2e15
View
@@ -87,7 +87,6 @@
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
@@ -123,7 +122,6 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -244,7 +242,6 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'pyfakefsdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
@@ -295,7 +292,7 @@
#
# latex_appendices = []
# It false, will not define \strong, \code, itleref, \crossref ... but only
# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
View
@@ -145,6 +145,7 @@ def scan_dir(path):
else:
return list(os.scandir(path))
def file_contents(path):
"""Return the contents of the given path as byte array."""
with open(path, 'rb') as f:
View
@@ -66,7 +66,7 @@ def setUp(self):
# This is before setUpPyfakefs(), so still using the real file system
with io.open(__file__, 'rb') as f:
self.real_contents = f.read()
self.setUpPyfakefs()
def tearDown(self):
@@ -33,41 +33,41 @@ def setUp(self):
self.fs.create_file('%s/subfile' % directory)
self.fs.create_file('[Temp]')
def testGlobEmpty(self):
def test_glob_empty(self):
self.assertEqual(glob.glob(''), [])
def testGlobStar(self):
def test_glob_star(self):
basedir = os.sep + 'xyzzy'
self.assertEqual([os.path.join(basedir, 'subdir'),
os.path.join(basedir, 'subdir2'),
os.path.join(basedir, 'subfile')],
sorted(glob.glob('/xyzzy/*')))
def testGlobExact(self):
def test_glob_exact(self):
self.assertEqual(['/xyzzy'], glob.glob('/xyzzy'))
self.assertEqual(['/xyzzy/subfile'], glob.glob('/xyzzy/subfile'))
def testGlobQuestion(self):
def test_glob_question(self):
basedir = os.sep + 'xyzzy'
self.assertEqual([os.path.join(basedir, 'subdir'),
os.path.join(basedir, 'subdir2'),
os.path.join(basedir, 'subfile')],
sorted(glob.glob('/x?zz?/*')))
def testGlobNoMagic(self):
def test_glob_no_magic(self):
self.assertEqual(['/xyzzy'], glob.glob('/xyzzy'))
self.assertEqual(['/xyzzy/subdir'], glob.glob('/xyzzy/subdir'))
def testNonExistentPath(self):
def test_non_existent_path(self):
self.assertEqual([], glob.glob('nonexistent'))
def testMagicDir(self):
def test_magic_dir(self):
self.assertEqual([os.sep + '[Temp]'], glob.glob('/*emp*'))
def testGlob1(self):
self.assertEqual(['[Temp]'], glob.glob1('/', '*Tem*'))
def testHasMagic(self):
def test_has_magic(self):
self.assertTrue(glob.has_magic('['))
self.assertFalse(glob.has_magic('a'))
Oops, something went wrong.

0 comments on commit a0d0b22

Please sign in to comment.