test_version
2from functions import __version__
3
4
5def test_version(): 6 assert type(__version__) is str
7
8
test_something_else
6 assert type(__version__) is str
7
8
9def test_something_else():10 assert __package_name__ == "functions-cli"
test_cloud_service_type
1from functions.constants import CloudServiceType
2
3
4def test_cloud_service_type():5 assert CloudServiceType.CLOUD_FUNCTION == "cloud_function"
6
7 assert CloudServiceType.all() == ["cloud_function"]
test_getting_default_system_config_path_for_windows
16
17# Skip if sys.platform is not windows
18@pytest.mark.skipif(not sys.platform.startswith("win32"), reason="Windows only")
19def test_getting_default_system_config_path_for_windows():20 # Set APPDATA environment variable
21 os.environ["APPDATA"] = "C:\\Users\\user\\AppData\\"
22 assert PACKAGE_CONFIG_DIR_PATH == "C:\\Users\\user\\AppData\\config"
test_getting_default_system_config_path_for_darwin
24
25# Skip if sys.platform is not darwin
26@pytest.mark.skipif(not sys.platform.startswith("darwin"), reason="Darwin only")
27def test_getting_default_system_config_path_for_darwin():28 # Set Darwin HOME environment variable
29 os.environ["HOME"] = "/Users/user"
30 assert PACKAGE_CONFIG_DIR_PATH == "Unknown"
The module/function docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.