File tree Expand file tree Collapse file tree 9 files changed +96
-1
lines changed
Expand file tree Collapse file tree 9 files changed +96
-1
lines changed Original file line number Diff line number Diff line change 1+ """The Conan provider plugin for CPPython."""
Original file line number Diff line number Diff line change 1+ """_summary_"""
2+
3+ from cppython .core .plugin_schema .provider import Provider
4+
5+
6+ class ConanProvider (Provider ):
7+ """Conan Provider"""
Original file line number Diff line number Diff line change 1+ """Conan plugin integration tests"""
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1+ """Git plugin integration tests"""
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1+ """Conan plugin unit tests"""
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments