Skip to content

Commit

Permalink
add test for deepcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Koubaa committed Jan 3, 2025
1 parent 85dddc0 commit b7a9830
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_deck.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ def test_deck_006(ref_string):
assert len(deck5._keywords) == len(deck3._keywords) + len(deck4._keywords)


@pytest.mark.keywords
def test_deck_copy():
import copy
x = Deck()
x.append(kwd.Mat001(mid=99))
y = copy.deepcopy(x)
y.keywords[0].mid = 100
assert x.keywords[0].mid == 99
assert y.keywords[0].mid == 100


@pytest.mark.keywords
def test_deck_read_parameters():
"""Test reading a deck with parameters."""
Expand Down

0 comments on commit b7a9830

Please sign in to comment.