# HG changeset patch # User Teemu Piippo # Date 1558701130 -10800 # Node ID e46fa477007b7611950e3a35e3b68e37fd9ec2fd # Parent 2753aad7967846ae5f7e39ff1ec5acac70f03b17 Fix operation under Python 3.4 diff -r 2753aad79678 -r e46fa477007b tests/subfiles.py --- a/tests/subfiles.py Fri May 24 14:20:18 2019 +0200 +++ b/tests/subfiles.py Fri May 24 15:32:10 2019 +0300 @@ -6,7 +6,7 @@ ini_path = Path(dirname(__file__)) / 'library-standards.ini' library_standards = ConfigParser() -with open(ini_path) as file: +with ini_path.open() as file: library_standards.read_file(file) def determinant_test(model): diff -r 2753aad79678 -r e46fa477007b testsuite.py --- a/testsuite.py Fri May 24 14:20:18 2019 +0200 +++ b/testsuite.py Fri May 24 15:32:10 2019 +0300 @@ -17,6 +17,12 @@ def notice(bad_object, error_name, **args): return report_element(bad_object, 'notice', error_name, args) +def name_of_package(package): + if isinstance(package, tuple): + return package[1] + else: + return package.name + def test_discovery(): ''' Finds all test modules and yields their names. @@ -24,7 +30,7 @@ from pkgutil import walk_packages import tests yield from sorted( - 'tests.' + result.name + 'tests.' + name_of_package(result) for result in walk_packages(tests.__path__) )