Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .config/cspell/project-software-terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ctypeslib # Standard library: ctypes
CVICALLBACK # NI CVI calling convention macro (C interop comment)
docstrings # Python terminology
dotenv # Dependency: python-decouple / dotenv
dotenvpath # Typo - TODO - rename the files and make related changes
dpkg # Linux system tool names (external)
dtype # Dependency: numpy
fixturenames # Dependency: pytest
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion generated/nidaqmx/_feature_toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from decouple import AutoConfig, Undefined, undefined

from nidaqmx._dotenvpath import get_dotenv_search_path
from nidaqmx._dotenv_path import get_dotenv_search_path
from nidaqmx.errors import FeatureNotSupportedError

if TYPE_CHECKING:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/handwritten/_feature_toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from decouple import AutoConfig, Undefined, undefined

from nidaqmx._dotenvpath import get_dotenv_search_path
from nidaqmx._dotenv_path import get_dotenv_search_path
from nidaqmx.errors import FeatureNotSupportedError

if TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from nidaqmx import _dotenvpath
from nidaqmx import _dotenv_path


@pytest.mark.parametrize("dotenv_exists", [False, True])
Expand All @@ -15,20 +15,20 @@ def test___dotenv_exists_varies___has_dotenv_file___matches_dotenv_exists(
for dir in subdirs:
dir.mkdir()

assert _dotenvpath._has_dotenv_file(tmp_path) == dotenv_exists
assert all([_dotenvpath._has_dotenv_file(p) == dotenv_exists for p in subdirs])
assert _dotenv_path._has_dotenv_file(tmp_path) == dotenv_exists
assert all([_dotenv_path._has_dotenv_file(p) == dotenv_exists for p in subdirs])


def test___get_caller_path___returns_this_modules_path() -> None:
assert _dotenvpath._get_caller_path() == Path(__file__)
assert _dotenv_path._get_caller_path() == Path(__file__)


def test___get_package_path___returns_package_dir() -> None:
assert _dotenvpath._get_package_path() == Path(_dotenvpath.__file__).parent
assert _dotenv_path._get_package_path() == Path(_dotenv_path.__file__).parent


def test___get_script_or_exe_path___returns_pytest_path() -> None:
path = _dotenvpath._get_script_or_exe_path()
path = _dotenv_path._get_script_or_exe_path()

assert path is not None
assert "pytest" in path.parts or "pytest.exe" in path.parts or "vscode_pytest" in path.parts
Loading