GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#63)
by
unknown
01:20
created

runtests.py (4 issues)

1
#!/usr/bin/env python
2
# coding: utf-8
3
"""
4
Run Django Test with Python setuptools test command
5
6
7
REFERENCE:
8
    http://gremu.net/blog/2010/enable-setuppy-test-your-django-apps/
9
10
"""
11
import os
12
import sys
13
14
def parse_args():
15
    import optparse
16
    parser = optparse.OptionParser()
17
    parser.add_option('--where', default=None)
18
    opts, args = parser.parse_args()
19
    return opts.where
20
21
def run_tests(base_dir=None, verbosity=1, interactive=False):
22
    base_dir = base_dir or os.path.dirname(__file__)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable __file__ does not seem to be defined.
Loading history...
23
    os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
24
    sys.path.insert(0, os.path.join(base_dir, 'src'))
25
    sys.path.insert(0, os.path.join(base_dir, 'tests'))
26
27
    from django.conf import settings
28
    from django.test.utils import get_runner
29
    """Run Django Test"""
30
    TestRunner = get_runner(settings)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable settings does not seem to be defined.
Loading history...
31
    test_runner = TestRunner(verbosity=verbosity,
32
                             interactive=interactive, failfast=False)
33
34
    import django
35
    if django.VERSION >= (1, 7):
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable django does not seem to be defined.
Loading history...
36
        django.setup()
37
38
    if django.VERSION >= (1, 6):
39
        app_tests = [
40
            'registration',
41
            'registration.contrib.notification',     # registration.contrib.notification
42
            'registration.contrib.autologin',        # registration.contrib.autologin
43
        ]
44
    else:
45
        app_tests = [
46
            'registration',
47
            'notification',     # registration.contrib.notification
48
            'autologin',        # registration.contrib.autologin
49
        ]
50
    failures = test_runner.run_tests(app_tests)
51
    sys.exit(bool(failures))
52
53
if __name__ == '__main__':
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable __name__ does not seem to be defined.
Loading history...
54
    base_dir = parse_args()
55
    run_tests(base_dir)
56
57