-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Initial pytest conversion. * Fix sudo run. * Run elevated tess on Windows. * Fix docstring. * Cleanup readme. * Fix tests. * Enable more pytest tests.
- Loading branch information
Showing
13 changed files
with
142 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "chevah-compat" | ||
version = "1.2.2" | ||
version = "1.3.0" | ||
maintainers = [ | ||
{ name = "Adi Roiban", email = "[email protected]" }, | ||
] | ||
|
@@ -44,6 +44,7 @@ dev = [ | |
"incremental", | ||
"service-identity==24.2.0", | ||
"pynose == 1.5.3", | ||
"pytest ~= 8.3", | ||
"coverage ~= 7.5", | ||
"diff_cover == 9.2.0", | ||
"codecov == 2.1.12", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[pytest] | ||
minversion = 6.0 | ||
addopts = -ra -q -v --capture=no | ||
testpaths = | ||
src/chevah_compat/tests/normal | ||
|
||
filterwarnings = | ||
ignore: 'crypt' is deprecated and slated for removal | ||
ignore: 'spwd' is deprecated and slated for removal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2024 Adi Roiban. | ||
# See LICENSE for details. | ||
""" | ||
Fixtures for pytest run mode. | ||
""" | ||
|
||
import pytest | ||
|
||
from chevah_compat.tests import setup_package, teardown_package | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def setup_package_pytest(): | ||
""" | ||
Just wraps pynose package setup to pytest fixtuers. | ||
Mare sure the name does not start with `pytest` as this is reserved | ||
for the pytest framework. | ||
""" | ||
setup_package() | ||
yield | ||
teardown_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2024 Adi Roiban. | ||
# See LICENSE for details. | ||
""" | ||
Fixtures for pytest run mode. | ||
""" | ||
|
||
import pytest | ||
|
||
from chevah_compat.tests.elevated import setup_package, teardown_package | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def setup_package_elevated_pytest(): | ||
""" | ||
Just wraps pynose elevated package setup to pytest fixtures. | ||
Mare sure the name does not start with `pytest` as this is reserved | ||
for the pytest framework. | ||
""" | ||
setup_package() | ||
yield | ||
teardown_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters