forked from uvemas/ViTables
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_{samples,calculator}.py: migrate from nose to pytest.
Description: nose is an obsoleted testing framework for Python, dead and unmaintained since 2015 Properly teardown fixtures after the test. Reference: https://bugs.debian.org/1018659 Reference: https://bugs.gentoo.org/878727 Reference: uvemas#114
- Loading branch information
Benda Xu
committed
Feb 1, 2023
1 parent
d7dcbb6
commit b9a7a3d
Showing
4 changed files
with
22 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import vitables.calculator.calculator as vtc | ||
|
||
|
||
class TestCalculator: | ||
"""Test calculator functionality.""" | ||
|
||
def test_extract_identifiers(self): | ||
"""Test function that extract marked identifiers from an expression.""" | ||
empty_set = vtc.extract_identifiers('') | ||
assert len(empty_set) == 0 | ||
assert set(['$data']) == vtc.extract_identifiers('$data') | ||
assert set(['$data']) == vtc.extract_identifiers('+$data*') | ||
assert set(['$data']) == vtc.extract_identifiers('+$data*$data') | ||
assert set(['$data', '$data1']) == vtc.extract_identifiers('+$data*$data1 + test') | ||
assert set(['$data', '$test.data1']) == vtc.extract_identifiers('+$data*$test.data1 + test') |
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
Empty file.
This file was deleted.
Oops, something went wrong.