test.test_create_db   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 39
dl 0
loc 49
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A testing_create_db() 0 20 1
1
#!/usr/bin/python
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# -*- coding: utf-8 -*-
3
4
try:
5
    import unittest
6
    import logging
7
    import sys
8
    from test.test_address import TestAddressResolver, TestFullAddressResolver, TestOpeningHoursCleaner, \
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (106/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
9
        TestOpeningHoursCleaner2, TestPhoneClener, TestPhoneClener_to_str, TestStringCleaner, TestURLCleaner, \
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (111/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
10
        TestCityCleaner
11
    from test.test_online_poi_matching import TestSmartOnlinePOIMatching
12
    from test.test_opening_hours import TestOpeningHours
13
    # from test.test_poi_dataset import TestPOIDataset
14
    from test.test_timing import TestTiming
15
    from test.test_osm import TestOSMRelationer
16
    from osm_poi_matchmaker.utils import config
17
except ImportError as err:
18
    logging.error('Error %s import module: %s', __name__, err)
19
    logging.exception('Exception occurred')
20
21
    sys.exit(128)
22
23
24
def testing_create_db():
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
25
    address_resolver = unittest.TestLoader().loadTestsFromTestCase(TestAddressResolver)
26
    address_full_resolver = unittest.TestLoader().loadTestsFromTestCase(TestFullAddressResolver)
27
    opening_hours_cleaner = unittest.TestLoader().loadTestsFromTestCase(TestOpeningHoursCleaner)
28
    opening_hours_cleaner2 = unittest.TestLoader().loadTestsFromTestCase(TestOpeningHoursCleaner2)
29
    city_cleaner = unittest.TestLoader().loadTestsFromTestCase(TestCityCleaner)
30
    phone_cleaner = unittest.TestLoader().loadTestsFromTestCase(TestPhoneClener)
31
    phone_cleaner_to_str = unittest.TestLoader().loadTestsFromTestCase(TestPhoneClener_to_str)
32
    string_cleaner = unittest.TestLoader().loadTestsFromTestCase(TestStringCleaner)
33
    url_cleaner = unittest.TestLoader().loadTestsFromTestCase(TestURLCleaner)
34
    opening_hours_resolver = unittest.TestLoader().loadTestsFromTestCase(TestOpeningHours)
35
    smart_online_poi_matching = unittest.TestLoader().loadTestsFromTestCase(TestSmartOnlinePOIMatching)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (103/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
36
    # poi_dataset = unittest.TestLoader().loadTestsFromTestCase(TestPOIDataset)
37
    timing = unittest.TestLoader().loadTestsFromTestCase(TestTiming)
38
    osm = unittest.TestLoader().loadTestsFromTestCase(TestOSMRelationer)
39
    suite = unittest.TestSuite(
40
        [address_resolver, address_full_resolver, opening_hours_cleaner, opening_hours_cleaner2, city_cleaner,
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (110/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
41
         phone_cleaner, phone_cleaner_to_str, string_cleaner, url_cleaner, opening_hours_resolver,
42
         smart_online_poi_matching, timing, osm])
43
    return unittest.TextTestRunner(verbosity=2).run(suite)
44
45
46
if __name__ == '__main__':
47
    config.set_mode(config.Mode.matcher)
48
    testing_create_db()
49