| 754 | |
| 755 | |
| 756 | def test_checkout_executable(tmp_dir, dvc): |
| 757 | tmp_dir.dvc_gen("foo", "foo") |
| 758 | |
| 759 | contents = (tmp_dir / "foo.dvc").parse() |
| 760 | contents["outs"][0]["isexec"] = True |
| 761 | (tmp_dir / "foo.dvc").dump(contents) |
| 762 | |
| 763 | assert dvc.checkout("foo") == empty_checkout | { |
| 764 | "modified": ["foo"], |
| 765 | "stats": empty_stats | {"modified": 1}, |
| 766 | } |
| 767 | |
| 768 | isexec = os.stat("foo").st_mode & stat.S_IEXEC |
| 769 | if os.name == "nt": |
| 770 | # NOTE: you can't set exec bits on Windows |
| 771 | assert not isexec |
| 772 | else: |
| 773 | assert isexec |
| 774 | |
| 775 | |
| 776 | def test_checkout_partial(tmp_dir, dvc): |