Code Repositories xandikos / a56ede9
Add Python3 infrastructure. Jelmer Vernooń≥ 3 years ago
4 changed file(s) with 99 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 PYTHON ?= python3
1
2 check:
3 $(PYTHON) -m unittest dystros.tests.test_suite
0 # Dystros
1 # Copyright (C) 2016 Jelmer Vernooij <jelmer@jelmer.uk>
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; version 2
6 # of the License or (at your option) any later version of
7 # the License.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 # MA 02110-1301, USA.
18
19 """Collections and collection sets."""
20
21 import dulwich
22
23
24 class Collection(object):
25 """A ICalendar collection."""
26
27
28 class GitCollection(object):
29 """A Collection backed by a Git Repository.
30 """
31
32 def __init__(self, repo):
33 self._repo = repo
34
35
36 class CollectionSet(object):
37 """A set of ICalendar collections.
38 """
39
40
41 class FilesystemCollectionSet(object):
42 """A CollectionSet that is backed by a filesystem."""
43
44 def __init__(self, path):
45 self._path = path
0 # Dystros
1 # Copyright (C) 2016 Jelmer Vernooij <jelmer@jelmer.uk>
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; version 2
6 # of the License or (at your option) any later version of
7 # the License.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 # MA 02110-1301, USA.
18
19 import unittest
20
21
22 def test_suite():
23 names = [
24 'collection',
25 ]
26 module_names = ['dystros.tests.test_' + name for name in names]
27 loader = unittest.TestLoader()
28 return loader.loadTestsFromNames(module_names)
0 # Dystros
1 # Copyright (C) 2016 Jelmer Vernooij <jelmer@jelmer.uk>
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; version 2
6 # of the License or (at your option) any later version of
7 # the License.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 # MA 02110-1301, USA.
18
19 import unittest