Skip to content

Commit 910ce17

Browse files
committed
Init Conan Plugin
1 parent 6f777d2 commit 910ce17

File tree

9 files changed

+96
-1
lines changed

9 files changed

+96
-1
lines changed

cppython/plugins/conan/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""The Conan provider plugin for CPPython."""

cppython/plugins/conan/plugin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""_summary_"""
2+
3+
from cppython.core.plugin_schema.provider import Provider
4+
5+
6+
class ConanProvider(Provider):
7+
"""Conan Provider"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Conan plugin integration tests"""
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""Integration tests for the provider"""
2+
3+
from typing import Any
4+
5+
import pytest
6+
7+
from cppython.plugins.conan.plugin import ConanProvider
8+
from cppython.test.pytest.tests import ProviderIntegrationTests
9+
10+
11+
class TestCPPythonProvider(ProviderIntegrationTests[ConanProvider]):
12+
"""The tests for the conan provider"""
13+
14+
@staticmethod
15+
@pytest.fixture(name='plugin_data', scope='session')
16+
def fixture_plugin_data() -> dict[str, Any]:
17+
"""A required testing hook that allows data generation
18+
19+
Returns:
20+
The constructed plugin data
21+
"""
22+
return {}
23+
24+
@staticmethod
25+
@pytest.fixture(name='plugin_type', scope='session')
26+
def fixture_plugin_type() -> type[ConanProvider]:
27+
"""A required testing hook that allows type generation
28+
29+
Returns:
30+
The type of the Provider
31+
"""
32+
return ConanProvider
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Git plugin integration tests"""
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Integration tests for the cppython SCM plugin"""
2+
3+
import pytest
4+
5+
from cppython.plugins.git.plugin import GitSCM
6+
from cppython.test.pytest.tests import SCMIntegrationTests
7+
8+
9+
class TestGitInterface(SCMIntegrationTests[GitSCM]):
10+
"""Integration tests for the Git SCM plugin"""
11+
12+
@staticmethod
13+
@pytest.fixture(name='plugin_type', scope='session')
14+
def fixture_plugin_type() -> type[GitSCM]:
15+
"""A required testing hook that allows type generation
16+
17+
Returns:
18+
The SCM type
19+
"""
20+
return GitSCM

tests/unit/core/test_resolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_pep621_resolve() -> None:
4444

4545
class_variables = vars(resolved)
4646

47-
assert len(class_variables)
47+
assert class_variables
4848
assert None not in class_variables.values()
4949

5050
@staticmethod
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Conan plugin unit tests"""
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""Unit test the provider plugin"""
2+
3+
from typing import Any
4+
5+
import pytest
6+
7+
from cppython.plugins.conan.plugin import ConanProvider
8+
from cppython.test.pytest.tests import ProviderUnitTests
9+
10+
11+
class TestCPPythonProvider(ProviderUnitTests[ConanProvider]):
12+
"""The tests for the Conan Provider"""
13+
14+
@staticmethod
15+
@pytest.fixture(name='plugin_data', scope='session')
16+
def fixture_plugin_data() -> dict[str, Any]:
17+
"""A required testing hook that allows data generation
18+
19+
Returns:
20+
The constructed plugin data
21+
"""
22+
return {}
23+
24+
@staticmethod
25+
@pytest.fixture(name='plugin_type', scope='session')
26+
def fixture_plugin_type() -> type[ConanProvider]:
27+
"""A required testing hook that allows type generation
28+
29+
Returns:
30+
The type of the Provider
31+
"""
32+
return ConanProvider

0 commit comments

Comments
 (0)