TYP: clean unreachable code and duplicate test #27396
xref #27396
```
pandas/tests/frame/test_to_csv.py:363: error: Right operand of 'or' is never evaluated  [unreachable]
pandas/tests/frame/test_to_csv.py:389: error: Right operand of 'or' is never evaluated  [unreachable]
pandas/tests/frame/test_to_csv.py:417: error: Right operand of 'or' is never evaluated  [unreachable]
pandas/tests/frame/test_to_csv.py:443: error: Right operand of 'or' is never evaluated  [unreachable]
```
thanks @fangchenli 