nrevah-tstcls: Test Class Base
Project description
pytest-tstcls
Test Class Base
How to use
Simple Tests
from tstcls import TestClassBase
class TestMyClass(TestClassBase):
def setup_test(self):
self.tester = MyClass()
def test_my_method(self):
###
self.tester.my_method()
###
Use Mocks
from tstcls import TestClassBase
class TestMyClass(TestClassBase):
def setup_test(self):
self.my_mocked_dependency = Mock()
self.tester = MyClass(self.my_mocked_dependency)
def test_my_method(self):
self.my_mocked_dependency.return_value = 123
###
self.tester.my_method()
###
Use fixtures as usual
from tstcls import TestClassBase
class TestMyClass(TestClassBase):
@pytest.fixture
def my_fixture(self):
return 321
def setup_test(self, my_fixture):
self.tester = MyClass(my_fixture)
def test_my_method(self, my_fixture):
###
self.tester.my_method()
###
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nrevah_tstcls-1.0.1.tar.gz.
File metadata
- Download URL: nrevah_tstcls-1.0.1.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efc22583ce9d12f90735432ec18bca68aec7ee7a2dc4c74a863b6e5025559594
|
|
| MD5 |
adf566448d428adfa0e781e812df58ff
|
|
| BLAKE2b-256 |
5ef9a109291ce144d27fbc29afe94d969c11ece8989e7803ea444f9b60638da3
|
Provenance
The following attestation bundles were made for nrevah_tstcls-1.0.1.tar.gz:
Publisher:
release.yml on netanelrevah/tstcls
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nrevah_tstcls-1.0.1.tar.gz -
Subject digest:
efc22583ce9d12f90735432ec18bca68aec7ee7a2dc4c74a863b6e5025559594 - Sigstore transparency entry: 1237143726
- Sigstore integration time:
-
Permalink:
netanelrevah/tstcls@5d9208de7913a0e7f07bf27b72cc610a3b7cf8ea -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/netanelrevah
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5d9208de7913a0e7f07bf27b72cc610a3b7cf8ea -
Trigger Event:
push
-
Statement type:
File details
Details for the file nrevah_tstcls-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nrevah_tstcls-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f8d69ee0f48afcf920eea42b0cefcaa63fc85a6c6cd9487933cdbbe1ddc35ac
|
|
| MD5 |
6887d7430338abe2f35e6d559d4c6582
|
|
| BLAKE2b-256 |
aa297bd0fe4a9d40d527bd2a337b441921a6e64e8b2ca3f593f5dab416ebfe02
|
Provenance
The following attestation bundles were made for nrevah_tstcls-1.0.1-py3-none-any.whl:
Publisher:
release.yml on netanelrevah/tstcls
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nrevah_tstcls-1.0.1-py3-none-any.whl -
Subject digest:
1f8d69ee0f48afcf920eea42b0cefcaa63fc85a6c6cd9487933cdbbe1ddc35ac - Sigstore transparency entry: 1237143769
- Sigstore integration time:
-
Permalink:
netanelrevah/tstcls@5d9208de7913a0e7f07bf27b72cc610a3b7cf8ea -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/netanelrevah
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5d9208de7913a0e7f07bf27b72cc610a3b7cf8ea -
Trigger Event:
push
-
Statement type: