Skip to content

Commit 6c77042

Browse files
committed
modernizing tests (conan-io#18349)
* modernizing tests * more tests * moved test
1 parent fb37583 commit 6c77042

6 files changed

Lines changed: 206 additions & 239 deletions

File tree

test/functional/workspace/test_workspace.py

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pytest
66

77
from conan.api.subapi.workspace import WorkspaceAPI
8-
from conan.internal.util.files import chdir
98
from conan.test.utils.tools import TestClient
109

1110
WorkspaceAPI.TEST_ENABLED = "will_break_next"
@@ -48,49 +47,3 @@ def test_metabuild():
4847
assert "Adding project app1" in c.out
4948
c.run_command("cmake --build --preset conan-release")
5049
# it doesn't fail
51-
52-
53-
@pytest.mark.tool("cmake")
54-
def test_relative_paths():
55-
# This is using the meta-project
56-
c = TestClient()
57-
c.run("new cmake_lib -d name=liba --output=liba")
58-
c.run("new cmake_exe -d name=app1 -d requires=liba/0.1 --output=app1")
59-
c.run("new cmake_lib -d name=libb --output=other/libb")
60-
c.run("new cmake_exe -d name=app2 -d requires=libb/0.1 --output=other/app2")
61-
c.run("workspace init mywks")
62-
c.run("workspace init otherwks")
63-
# cd mywks
64-
with c.chdir("mywks"):
65-
c.run("workspace add ../liba")
66-
c.run("workspace add ../app1 --product")
67-
c.run("workspace build")
68-
conanws_yml = textwrap.dedent("""\
69-
editables:
70-
app1/0.1:
71-
path: ../app1
72-
liba/0.1:
73-
path: ../liba
74-
products:
75-
- ../app1
76-
""")
77-
assert conanws_yml == c.load("conanws.yml")
78-
# cd otherwks
79-
with c.chdir("otherwks"):
80-
c.run("workspace add ../other/libb")
81-
c.run("workspace add ../other/app2 --product")
82-
c.run("workspace build")
83-
conanws_yml = textwrap.dedent("""\
84-
editables:
85-
app2/0.1:
86-
path: ../other/app2
87-
libb/0.1:
88-
path: ../other/libb
89-
products:
90-
- ../other/app2
91-
""")
92-
assert conanws_yml == c.load("conanws.yml")
93-
94-
ext = ".exe" if platform.system() == "Windows" else ""
95-
assert os.path.exists(os.path.join(c.current_folder, "app1", "build", "Release", f"app1{ext}"))
96-
assert os.path.exists(os.path.join(c.current_folder, "other", "app2", "build", "Release", f"app2{ext}"))

0 commit comments

Comments
 (0)