Skip to content

Commit 0025cfb

Browse files
Add comments about what the test does
1 parent 79b3549 commit 0025cfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

binderhub/tests/test_app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@ def test_help_all():
1717
check_output([sys.executable, '-m', 'binderhub', '--help-all'])
1818

1919
def test_repo_providers():
20+
# Check that repo_providers property is validated by traitlets.validate
21+
2022
b = BinderHub()
2123

2224
class Provider(RepoProvider):
2325
pass
2426

27+
# Setting providers that inherit from 'RepoProvider` should be allowed
2528
b.repo_providers = dict(gh=GitHubRepoProvider, gl=GitLabRepoProvider)
2629
b.repo_providers = dict(p=Provider)
2730

2831
class BadProvider():
2932
pass
3033

34+
# Setting providers that don't inherit from 'RepoProvider` should raise an error
3135
wrong_repo_providers = [GitHubRepoProvider, {}, 'GitHub', BadProvider]
3236
for repo_providers in wrong_repo_providers:
3337
with pytest.raises(TraitError):

0 commit comments

Comments
 (0)