Skip to content

Commit 8758516

Browse files
committed
Tests: move another batch to pytest
1 parent 3d70c9e commit 8758516

9 files changed

+5
-20
lines changed

unittests/bit_fields_tester.py renamed to tests/test_bit_fields.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def setUp(self):
2525
Test.global_ns = declarations.get_global_namespace(decls)
2626
Test.global_ns.init_optimizer()
2727

28-
def test(self):
28+
def test_bit_fields(self):
2929
bf_x = self.global_ns.variable('x')
3030
self.assertTrue(bf_x.bits == 1)
3131

File renamed without changes.

unittests/calldef_matcher_tester.py renamed to tests/test_calldef_matcher.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setUp(self):
2323
if not self.declarations:
2424
self.declarations = parser.parse([self.header], self.config)
2525

26-
def test(self):
26+
def test_calldef_matcher(self):
2727
criteria = declarations.calldef_matcher_t(
2828
name='return_default_args',
2929
return_type='int',

unittests/const_volatile_arg_tester.py renamed to tests/test_const_volatile_arg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUp(self):
2626
Test.global_ns.init_optimizer()
2727
self.global_ns = Test.global_ns
2828

29-
def test(self):
29+
def test_const_volatile_arg(self):
3030
f = self.global_ns.free_function('pygccxml_bug')
3131
t = f.arguments[0].decl_type
3232
self.assertTrue(isinstance(t, declarations.pointer_t))

tests/test_copy_constructor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def setUp(self):
2828
self.xml_generator_from_xml_file = Test.xml_generator_from_xml_file
2929
self.global_ns = Test.global_ns
3030

31-
def test(self):
31+
def test_copy_constructor(self):
3232
"""
3333
Check the is_copy_constructor method.
3434

unittests/copy_constructor_tester.py renamed to tests/test_copy_constructor2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def tearDown(self):
4848
# Delete the extracted xml file
4949
os.remove(self.xml_path)
5050

51-
def test(self):
51+
def test_copy_constructor2(self):
5252
for x in self.global_ns.typedefs('SettingsMultiMap'):
5353
self.assertTrue(not declarations.is_noncopyable(x))
5454

File renamed without changes.
File renamed without changes.

unittests/test_all.py

-15
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import unittest
99
import platform
1010

11-
from . import decl_string_tester
1211
from . import declaration_files_tester
1312
from . import declarations_comparison_tester
1413
from . import declarations_tester
@@ -21,12 +20,9 @@
2120
from . import core_tester
2221
from . import hierarchy_traveling
2322
from . import patcher_tester
24-
from . import call_invocation_tester
25-
from . import bit_fields_tester
2623
from . import complex_types_tester
2724
from . import cached_source_file_tester
2825
from . import namespace_matcher_tester
29-
from . import calldef_matcher_tester
3026
from . import filters_tester
3127
from . import cache_enums_tester
3228
from . import decl_printer_tester
@@ -39,13 +35,10 @@
3935
from . import free_operators_tester
4036
from . import remove_template_defaults_tester
4137
from . import find_container_traits_tester
42-
from . import copy_constructor_tester
4338
from . import plain_c_tester
44-
from . import function_traits_tester
4539
from . import better_templates_matcher_tester
4640
from . import declaration_matcher_tester
4741
from . import calling_convention_tester
48-
from . import const_volatile_arg_tester
4942
from . import gccxml10184_tester
5043
from . import gccxml10185_tester
5144
from . import inline_specifier_tester
@@ -55,7 +48,6 @@
5548
from . import test_overrides
5649

5750
testers = [
58-
decl_string_tester,
5951
declaration_files_tester,
6052
declarations_comparison_tester,
6153
declarations_tester, file_cache_tester,
@@ -66,12 +58,9 @@
6658
templates_tester,
6759
core_tester,
6860
hierarchy_traveling,
69-
call_invocation_tester,
70-
bit_fields_tester,
7161
complex_types_tester,
7262
cached_source_file_tester,
7363
namespace_matcher_tester,
74-
calldef_matcher_tester,
7564
filters_tester,
7665
cache_enums_tester,
7766
non_copyable_classes_tester,
@@ -82,11 +71,9 @@
8271
dependencies_tester,
8372
free_operators_tester,
8473
plain_c_tester,
85-
function_traits_tester,
8674
better_templates_matcher_tester,
8775
declaration_matcher_tester,
8876
calling_convention_tester,
89-
const_volatile_arg_tester,
9077
gccxml10184_tester,
9178
gccxml10185_tester,
9279
inline_specifier_tester,
@@ -103,8 +90,6 @@
10390
# Known to fail under windows with VS2013
10491
testers.append(example_tester)
10592

106-
if 'posix' in os.name:
107-
testers.append(copy_constructor_tester)
10893

10994
if os.path.isfile("test_cost.log"):
11095
# Remove the cost log file when tests are run again.

0 commit comments

Comments
 (0)