Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rihi committed Sep 4, 2024
1 parent 8676ccc commit 9f953a8
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions tests/structures/pseudo/test_complextypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ def test_declaration(self, book: Struct, record_id: Union):
def test_str(self, book: Struct):
assert str(book) == "Book"

def test_copy(self, book: Struct):
new_book: Struct = book.copy()
assert id(new_book) != id(book)
assert new_book.size == book.size
assert new_book.type_specifier == book.type_specifier == ComplexTypeSpecifier.STRUCT
assert id(new_book.members) != id(book.members)
assert new_book.get_member_by_offset(0) == book.get_member_by_offset(0)
assert id(new_book.get_member_by_offset(0)) != id(book.get_member_by_offset(0))
assert len(new_book.members) == len(book.members)

def test_add_members(self, book, title, num_pages, author):
empty_book = Struct(name="Book", members={}, size=96)
empty_book.add_member(title)
Expand Down Expand Up @@ -72,16 +62,6 @@ def test_declaration(self, class_book: Struct, record_id: Union):
def test_str(self, class_book: Struct):
assert str(class_book) == "ClassBook"

def test_copy(self, class_book: Struct):
new_class_book: Struct = class_book.copy()
assert id(new_class_book) != id(class_book)
assert new_class_book.size == class_book.size
assert new_class_book.type_specifier == class_book.type_specifier == ComplexTypeSpecifier.CLASS
assert id(new_class_book.members) != id(class_book.members)
assert new_class_book.get_member_by_offset(0) == class_book.get_member_by_offset(0)
assert id(new_class_book.get_member_by_offset(0)) != id(class_book.get_member_by_offset(0))
assert len(new_class_book.members) == len(class_book.members)

def test_add_members(self, class_book, title, num_pages, author):
empty_class_book = Class(name="ClassBook", members={}, size=96)
empty_class_book.add_member(title)
Expand Down Expand Up @@ -156,14 +136,6 @@ def test_declaration(self, record_id):
def test_str(self, record_id):
assert str(record_id) == "RecordID"

def test_copy(self, record_id):
new_record_id: Union = record_id.copy()
assert new_record_id == record_id
assert id(new_record_id) != id(record_id)
assert id(new_record_id.members) != id(record_id.members)
assert new_record_id.get_member_by_type(Float.float()) == record_id.get_member_by_type(Float.float())
assert id(new_record_id.get_member_by_type(Float.float())) != id(record_id.get_member_by_type(Float.float()))

def test_add_members(self, empty_record_id, record_id, float_id, int_id, double_id):
empty_record_id.add_member(float_id)
empty_record_id.add_member(int_id)
Expand Down Expand Up @@ -225,11 +197,6 @@ def test_declaration(self, color):
def test_str(self, color):
assert str(color) == "Color"

def test_copy(self, color):
new_color = color.copy()
assert new_color == color
assert id(new_color) != color

def test_add_members(self, empty_color, color, red, green, blue):
empty_color.add_member(red)
empty_color.add_member(green)
Expand Down

0 comments on commit 9f953a8

Please sign in to comment.