| 320 | |
| 321 | |
| 322 | def test_pull_external_dvc_imports_mixed(tmp_dir, dvc, scm, erepo_dir, local_remote): |
| 323 | with erepo_dir.chdir(): |
| 324 | erepo_dir.dvc_gen("foo", "foo", commit="first") |
| 325 | os.remove("foo") |
| 326 | |
| 327 | # imported: foo |
| 328 | dvc.imp(os.fspath(erepo_dir), "foo") |
| 329 | |
| 330 | # local-object: bar |
| 331 | tmp_dir.dvc_gen("bar", "bar") |
| 332 | dvc.push("bar") |
| 333 | |
| 334 | clean(["foo", "bar"], dvc) |
| 335 | |
| 336 | assert dvc.pull() == empty_pull | { |
| 337 | "added": ["bar", "foo"], |
| 338 | "stats": empty_stats | {"fetched": 2, "added": 2}, |
| 339 | } |
| 340 | assert (tmp_dir / "foo").read_text() == "foo" |
| 341 | assert (tmp_dir / "bar").read_text() == "bar" |
| 342 | |
| 343 | |
| 344 | def clean(outs, dvc=None): |