From a7084b3b77344d6c74fa05dc5ef963317a8bf7a7 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sun, 6 Jan 2019 12:19:51 +0000 Subject: [PATCH 1/4] Test registry decorator --- fs/info.py | 2 +- tests/test_opener.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/fs/info.py b/fs/info.py index 0c297687..cb5637c0 100644 --- a/fs/info.py +++ b/fs/info.py @@ -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` diff --git a/tests/test_opener.py b/tests/test_opener.py index 8661d3cb..f836dd9f 100644 --- a/tests/test_opener.py +++ b/tests/test_opener.py @@ -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): @@ -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): From 1f6c80e8f060281891ee569d47208023face042c Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sun, 6 Jan 2019 12:21:35 +0000 Subject: [PATCH 2/4] PR template --- pull_request_template.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index fad46bfb..84501e66 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,7 +1,3 @@ -# PyFilesystem Pull Request - -Thank you for your pull request! - ## Type of changes - [ ] Bug fix From 3b5b54cd3e7b6bdacd6840d9139d81cf99eb533c Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sun, 6 Jan 2019 12:23:09 +0000 Subject: [PATCH 3/4] version bump --- CHANGELOG.md | 2 +- fs/_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8af1a650..8842a184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## Unreleased +## [2.2.1] - 2018-01-06 ### Fixed diff --git a/fs/_version.py b/fs/_version.py index 54528809..b32cd4c8 100644 --- a/fs/_version.py +++ b/fs/_version.py @@ -1,3 +1,3 @@ """Version, used in module and setup.py. """ -__version__ = "2.2.0" +__version__ = "2.2.1" From 783d80118925395c5cca345763d112f86c9bf041 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sun, 6 Jan 2019 12:24:51 +0000 Subject: [PATCH 4/4] pointless test --- tests/test_opener.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_opener.py b/tests/test_opener.py index f836dd9f..398393f4 100644 --- a/tests/test_opener.py +++ b/tests/test_opener.py @@ -172,7 +172,6 @@ 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):