Skip to content
Snippets Groups Projects
Commit bd672752 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'remote-test-mains' into 'master'

Remove main methods from tests (sorry for adding them)

See merge request !37
parents 56452c21 9089cc44
No related merge requests found
......@@ -31,7 +31,6 @@ def test_address_of():
def test_address_of_with_cse():
x, y = pystencils.fields('x,y: int64[2d]')
s = pystencils.TypedSymbol('s', PointerType('int64'))
assignments = pystencils.AssignmentCollection({
y[0, 0]: cast_func(address_of(x[0, 0]), 'int64'),
......
......@@ -30,11 +30,3 @@ def test_assignment_collection_dict_conversion():
assert collection_dict.main_assignments_dict == {y[1, 0]: x.center(),
y[0, 0]: x.center()}
assert collection_dict.subexpressions_dict == {}
def main():
test_assignment_collection_dict_conversion()
if __name__ == '__main__':
main()
......@@ -47,13 +47,3 @@ def test_cuda_unknown():
code = str(pystencils.show_code(ast))
print(code)
assert "Not supported in CUDA" in code
def main():
test_cuda_known_functions()
test_cuda_but_not_c()
test_cuda_unknown()
if __name__ == '__main__':
main()
......@@ -40,11 +40,3 @@ def test_custom_backends():
print(pystencils.show_code(ast, ScreamingGpuBackend()))
with pytest.raises(pycuda.driver.CompileError):
pystencils.gpucuda.cudajit.make_python_function(ast, custom_backend=ScreamingGpuBackend())
def main():
test_custom_backends()
if __name__ == "__main__":
main()
......@@ -41,12 +41,3 @@ def test_destructuring_alternative_field_class():
ast = pystencils.create_kernel(normal_assignments, target='gpu')
ast.body = DestructuringEmojiClass(ast.body)
print(pystencils.show_code(ast))
def main():
test_destructuring_field_class()
test_destructuring_alternative_field_class()
if __name__ == '__main__':
main()
......@@ -64,12 +64,3 @@ def test_floor_ceil_float_no_optimization():
assert sp.floor(a).match(wild_floor)
assert assignments.find(wild_floor)
def main():
test_floor_ceil_int_optimization()
test_floor_ceil_float_no_optimization()
if __name__ == '__main__':
main()
......@@ -125,12 +125,3 @@ def test_global_definitions_without_global_symbol():
assert kernel is not None
assert TypedSymbol('Foo', 'double') in [p.symbol for p in ast.get_parameters()]
def main():
test_global_definitions_with_global_symbol()
test_global_definitions_without_global_symbol()
if __name__ == '__main__':
main()
......@@ -87,13 +87,3 @@ def test_match_for_assignment_collection():
}
assert assignments.find(wild_ceiling) == {sp.ceiling(x.center())}
assert len([a for a in assignments.find(wild_addition) if isinstance(a, sp.Add)]) == 2
def main():
test_wild_typed_symbol()
test_replace_and_subs_for_assignment_collection()
test_match_for_assignment_collection()
if __name__ == '__main__':
main()
......@@ -22,11 +22,3 @@ class UnsupportedNode(pystencils.astnodes.Node):
def test_print_unsupported_node():
with pytest.raises(NotImplementedError, match='CBackend does not support node of type UnsupportedNode'):
CBackend()(UnsupportedNode())
def main():
test_print_unsupported_node()
if __name__ == '__main__':
main()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment