(self, deep: bool, astype: type[object])
| 561 | @pytest.mark.parametrize("deep", [True, False]) |
| 562 | @pytest.mark.parametrize("astype", [float, int, str]) |
| 563 | def test_copy(self, deep: bool, astype: type[object]) -> None: |
| 564 | v = self.cls("x", (0.5 * np.arange(10)).astype(astype), {"foo": "bar"}) |
| 565 | w = v.copy(deep=deep) |
| 566 | assert type(v) is type(w) |
| 567 | assert_identical(v, w) |
| 568 | assert v.dtype == w.dtype |
| 569 | if self.cls is Variable: |
| 570 | if deep: |
| 571 | assert source_ndarray(v.values) is not source_ndarray(w.values) |
| 572 | else: |
| 573 | assert source_ndarray(v.values) is source_ndarray(w.values) |
| 574 | assert_identical(v, copy(v)) |
| 575 | |
| 576 | def test_copy_deep_recursive(self) -> None: |
| 577 | # GH:issue:7111 |
nothing calls this directly
no test coverage detected