Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: tests/test_fs_source.py

Issue 29968569: Issue 4014 - Publish python-abp on PyPI (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Patch Set: Address comment on PS4 Created Jan. 3, 2019, 4:41 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 # This file is part of Adblock Plus <https://adblockplus.org/>, 1 # This file is part of Adblock Plus <https://adblockplus.org/>,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 29 matching lines...) Expand all
40 40
41 41
42 def test_escape_source(fssource): 42 def test_escape_source(fssource):
43 with pytest.raises(ValueError): 43 with pytest.raises(ValueError):
44 list(fssource.get('../not-in-source.txt')) 44 list(fssource.get('../not-in-source.txt'))
45 45
46 46
47 def test_read_missing_file(fssource): 47 def test_read_missing_file(fssource):
48 with pytest.raises(NotFound): 48 with pytest.raises(NotFound):
49 list(fssource.get('foo/baz.txt')) 49 list(fssource.get('foo/baz.txt'))
50
51
52 def test_fssource_get_err(fssource):
53 with pytest.raises(IOError):
54 list(fssource.get(''))
OLDNEW

Powered by Google App Engine
This is Rietveld