Skip to content

Commit

Permalink
Merge 1f6c80e into 18ac2e0
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jan 6, 2019
2 parents 18ac2e0 + 1f6c80e commit 82a3ada
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fs/info.py
Expand Up @@ -31,7 +31,7 @@
class Info(object):
"""Container for :ref:`info`.
Resource informations are returned by the following methods:
Resource information is returned by the following methods:
* `~fs.base.FS.getinfo`
* `~fs.base.FS.scandir`
Expand Down
4 changes: 0 additions & 4 deletions pull_request_template.md
@@ -1,7 +1,3 @@
# PyFilesystem Pull Request

Thank you for your pull request!

## Type of changes

- [ ] Bug fix
Expand Down
16 changes: 16 additions & 0 deletions tests/test_opener.py
Expand Up @@ -15,6 +15,7 @@
from fs.memoryfs import MemoryFS
from fs.appfs import UserDataFS
from fs.opener.parse import ParseResult
from fs.opener.registry import Registry


class TestParse(unittest.TestCase):
Expand Down Expand Up @@ -167,6 +168,21 @@ def open_fs(self, *args, **kwargs):
"could not instantiate opener; some creation error", str(ctx.exception)
)

def test_install(self):
"""Test Registry.install works as a decorator."""
registry = Registry()
self.assertNotIn("foo", registry.protocols)
self.assertTrue(callable(registry.install))

@registry.install
class FooOpener(opener.Opener):
protocols = ["foo"]

def open_fs(self, *args, **kwargs):
pass

self.assertIn("foo", registry.protocols)


class TestManageFS(unittest.TestCase):
def test_manage_fs_url(self):
Expand Down

0 comments on commit 82a3ada

Please sign in to comment.