Skip to content

Commit

Permalink
Tests: move another batch to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
iMichka committed May 6, 2024
1 parent 3d70c9e commit 8758516
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setUp(self):
Test.global_ns = declarations.get_global_namespace(decls)
Test.global_ns.init_optimizer()

def test(self):
def test_bit_fields(self):
bf_x = self.global_ns.variable('x')
self.assertTrue(bf_x.bits == 1)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def setUp(self):
if not self.declarations:
self.declarations = parser.parse([self.header], self.config)

def test(self):
def test_calldef_matcher(self):
criteria = declarations.calldef_matcher_t(
name='return_default_args',
return_type='int',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setUp(self):
Test.global_ns.init_optimizer()
self.global_ns = Test.global_ns

def test(self):
def test_const_volatile_arg(self):
f = self.global_ns.free_function('pygccxml_bug')
t = f.arguments[0].decl_type
self.assertTrue(isinstance(t, declarations.pointer_t))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_copy_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setUp(self):
self.xml_generator_from_xml_file = Test.xml_generator_from_xml_file
self.global_ns = Test.global_ns

def test(self):
def test_copy_constructor(self):
"""
Check the is_copy_constructor method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def tearDown(self):
# Delete the extracted xml file
os.remove(self.xml_path)

def test(self):
def test_copy_constructor2(self):
for x in self.global_ns.typedefs('SettingsMultiMap'):
self.assertTrue(not declarations.is_noncopyable(x))

Expand Down
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions unittests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import unittest
import platform

from . import decl_string_tester
from . import declaration_files_tester
from . import declarations_comparison_tester
from . import declarations_tester
Expand All @@ -21,12 +20,9 @@
from . import core_tester
from . import hierarchy_traveling
from . import patcher_tester
from . import call_invocation_tester
from . import bit_fields_tester
from . import complex_types_tester
from . import cached_source_file_tester
from . import namespace_matcher_tester
from . import calldef_matcher_tester
from . import filters_tester
from . import cache_enums_tester
from . import decl_printer_tester
Expand All @@ -39,13 +35,10 @@
from . import free_operators_tester
from . import remove_template_defaults_tester
from . import find_container_traits_tester
from . import copy_constructor_tester
from . import plain_c_tester
from . import function_traits_tester
from . import better_templates_matcher_tester
from . import declaration_matcher_tester
from . import calling_convention_tester
from . import const_volatile_arg_tester
from . import gccxml10184_tester
from . import gccxml10185_tester
from . import inline_specifier_tester
Expand All @@ -55,7 +48,6 @@
from . import test_overrides

testers = [
decl_string_tester,
declaration_files_tester,
declarations_comparison_tester,
declarations_tester, file_cache_tester,
Expand All @@ -66,12 +58,9 @@
templates_tester,
core_tester,
hierarchy_traveling,
call_invocation_tester,
bit_fields_tester,
complex_types_tester,
cached_source_file_tester,
namespace_matcher_tester,
calldef_matcher_tester,
filters_tester,
cache_enums_tester,
non_copyable_classes_tester,
Expand All @@ -82,11 +71,9 @@
dependencies_tester,
free_operators_tester,
plain_c_tester,
function_traits_tester,
better_templates_matcher_tester,
declaration_matcher_tester,
calling_convention_tester,
const_volatile_arg_tester,
gccxml10184_tester,
gccxml10185_tester,
inline_specifier_tester,
Expand All @@ -103,8 +90,6 @@
# Known to fail under windows with VS2013
testers.append(example_tester)

if 'posix' in os.name:
testers.append(copy_constructor_tester)

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

0 comments on commit 8758516

Please sign in to comment.