surimi 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- surimi-0.0.0/.github/workflows/release.yml +57 -0
- surimi-0.0.0/.gitignore +5 -0
- surimi-0.0.0/LICENSE +7 -0
- surimi-0.0.0/PKG-INFO +14 -0
- surimi-0.0.0/README.md +1 -0
- surimi-0.0.0/docs/surimi.svg +25 -0
- surimi-0.0.0/lib/__init__.py +3 -0
- surimi-0.0.0/lib/cli.py +20 -0
- surimi-0.0.0/lib/data.py +13 -0
- surimi-0.0.0/lib/decorators/__init__.py +3 -0
- surimi-0.0.0/lib/decorators/test.py +47 -0
- surimi-0.0.0/lib/formater.py +39 -0
- surimi-0.0.0/lib/registration.py +32 -0
- surimi-0.0.0/lib/runner.py +70 -0
- surimi-0.0.0/pyproject.toml +21 -0
- surimi-0.0.0/setup.cfg +4 -0
- surimi-0.0.0/surimi.egg-info/PKG-INFO +14 -0
- surimi-0.0.0/surimi.egg-info/SOURCES.txt +20 -0
- surimi-0.0.0/surimi.egg-info/dependency_links.txt +1 -0
- surimi-0.0.0/surimi.egg-info/entry_points.txt +2 -0
- surimi-0.0.0/surimi.egg-info/requires.txt +2 -0
- surimi-0.0.0/surimi.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Release Surimi
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release-build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- name: Build release distributions
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install build
|
|
22
|
+
python -m build
|
|
23
|
+
- name: Upload distributions
|
|
24
|
+
uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: release-dists
|
|
27
|
+
path: dist/
|
|
28
|
+
retention-days: 5
|
|
29
|
+
|
|
30
|
+
pypi-publish:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
needs:
|
|
33
|
+
- release-build
|
|
34
|
+
permissions:
|
|
35
|
+
id-token: write
|
|
36
|
+
contents: write
|
|
37
|
+
environment:
|
|
38
|
+
name: pypi
|
|
39
|
+
url: https://pypi.org/p/surimi
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- name: Retrieve release distributions
|
|
43
|
+
uses: actions/download-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: release-dists
|
|
46
|
+
path: dist/
|
|
47
|
+
- name: Publish release distributions to PyPI
|
|
48
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
49
|
+
with:
|
|
50
|
+
packages-dir: dist/
|
|
51
|
+
- name: Create GitHub Release
|
|
52
|
+
uses: softprops/action-gh-release@v2
|
|
53
|
+
with:
|
|
54
|
+
files: dist/*
|
|
55
|
+
draft: false
|
|
56
|
+
prerelease: false
|
|
57
|
+
generate_release_notes: true
|
surimi-0.0.0/.gitignore
ADDED
surimi-0.0.0/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright © 2026 Nicolas Beuve
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
surimi-0.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: surimi
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Simple test library fully written in python
|
|
5
|
+
Author-email: Nicolas Beuve <nicolas@beuve.net>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: click
|
|
11
|
+
Requires-Dist: rich
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+

|
surimi-0.0.0/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
+
<svg width="100%" height="100%" viewBox="0 0 488 92" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
|
4
|
+
<g transform="matrix(1,0,0,1,-500,-468.228)">
|
|
5
|
+
<g transform="matrix(1.17005,0,0,1,-150.651,6.80186)">
|
|
6
|
+
<path d="M672.444,538.223C672.06,538.273 671.451,538.311 670.618,538.336C669.784,538.361 668.823,538.373 667.733,538.373L664.336,538.373C663.161,538.373 662.028,538.361 660.938,538.336C659.849,538.311 658.887,538.286 658.054,538.261C657.221,538.236 656.612,538.198 656.227,538.148C655.073,538.048 653.898,537.848 652.702,537.548C651.505,537.248 650.415,536.673 649.433,535.823C649.219,535.573 649.016,535.336 648.824,535.111C648.631,534.886 648.492,534.623 648.407,534.323C648.279,533.973 648.172,533.448 648.086,532.748C648.001,532.048 647.948,531.298 647.926,530.498C647.905,529.698 647.905,528.936 647.926,528.211C647.948,527.486 647.98,526.923 648.022,526.523C648.108,525.923 648.193,525.323 648.279,524.723C648.364,524.123 648.578,523.573 648.92,523.073C649.262,522.473 649.689,521.961 650.202,521.536C650.715,521.111 651.27,520.848 651.868,520.748C652.167,520.698 652.691,520.661 653.439,520.636C654.187,520.611 654.999,520.598 655.875,520.598L659.881,520.598C660.351,520.598 661.131,520.636 662.22,520.711C663.31,520.786 664.464,520.836 665.682,520.861C666.9,520.886 668.054,520.873 669.143,520.823C670.233,520.773 671.013,520.673 671.483,520.523C672.124,520.273 672.594,519.811 672.893,519.136C673.192,518.461 673.15,517.773 672.765,517.073C672.551,516.773 672.103,516.486 671.419,516.211C670.735,515.936 670.244,515.748 669.945,515.648C667.68,514.798 665.404,514.036 663.118,513.361C660.832,512.686 658.556,511.923 656.291,511.073C655.522,510.823 654.764,510.536 654.016,510.211C653.268,509.886 652.531,509.498 651.804,509.048C650.821,508.398 649.967,507.536 649.24,506.461C648.514,505.386 647.916,504.248 647.445,503.048C646.719,501.148 646.292,499.111 646.163,496.936C646.035,494.761 646.142,492.623 646.484,490.523C646.783,488.873 647.264,487.273 647.926,485.723C648.589,484.173 649.433,482.823 650.458,481.673C651.911,480.023 653.642,478.973 655.65,478.523C658.727,477.823 661.836,477.486 664.977,477.511C668.118,477.536 671.269,477.523 674.432,477.473C675.115,477.473 675.788,477.523 676.451,477.623C677.113,477.723 677.765,477.848 678.406,477.998C678.961,478.098 679.495,478.236 680.008,478.411C680.521,478.586 681.034,478.823 681.547,479.123C682.23,479.523 682.732,480.148 683.053,480.998C683.373,481.848 683.566,482.773 683.63,483.773C683.694,484.773 683.651,485.811 683.502,486.886C683.352,487.961 683.17,488.948 682.957,489.848C682.871,490.098 682.732,490.411 682.54,490.786C682.348,491.161 682.123,491.536 681.867,491.911C681.611,492.286 681.344,492.636 681.066,492.961C680.788,493.286 680.564,493.523 680.393,493.673C679.88,494.073 679.004,494.248 677.765,494.198C676.525,494.148 675.201,494.036 673.791,493.861C672.38,493.686 671.034,493.486 669.752,493.261C668.47,493.036 667.53,492.948 666.932,492.998C666.205,493.048 665.436,493.286 664.624,493.711C663.812,494.136 663.342,494.773 663.214,495.623C663.129,496.073 663.203,496.523 663.438,496.973C663.673,497.423 663.941,497.773 664.24,498.023C664.966,498.773 665.799,499.361 666.74,499.786C667.68,500.211 668.62,500.598 669.56,500.948C671.184,501.548 672.85,502.086 674.56,502.561C676.269,503.036 677.893,503.723 679.431,504.623C680.756,505.423 681.91,506.573 682.893,508.073C683.876,509.573 684.559,511.173 684.944,512.873C685.414,515.123 685.617,517.423 685.553,519.773C685.489,522.123 685.158,524.423 684.559,526.673C684.089,528.323 683.47,529.936 682.7,531.511C681.931,533.086 680.948,534.398 679.752,535.448C678.726,536.298 677.572,536.923 676.29,537.323C675.008,537.723 673.726,538.023 672.444,538.223Z" style="fill:rgb(226,92,0);fill-rule:nonzero;"/>
|
|
7
|
+
<path d="M712.379,535.148C709.302,536.048 706.14,536.198 702.892,535.598C701.61,535.348 700.339,534.936 699.078,534.361C697.817,533.786 696.631,533.048 695.52,532.148C694.794,531.548 694.174,530.823 693.661,529.973C693.149,529.123 692.7,528.248 692.315,527.348C691.76,526.048 691.3,524.686 690.937,523.261C690.574,521.836 690.286,520.398 690.072,518.948C689.345,514.748 688.939,510.511 688.854,506.236C688.769,501.961 688.833,497.698 689.046,493.448C689.089,492.848 689.132,492.023 689.174,490.973C689.217,489.923 689.281,488.836 689.367,487.711C689.452,486.586 689.602,485.536 689.815,484.561C690.029,483.586 690.307,482.873 690.649,482.423C690.905,482.073 691.343,481.811 691.963,481.636C692.582,481.461 693.234,481.336 693.918,481.261C694.602,481.186 695.275,481.148 695.937,481.148L697.507,481.148C697.935,481.148 698.48,481.173 699.142,481.223C699.804,481.273 700.456,481.361 701.097,481.486C701.738,481.611 702.336,481.798 702.892,482.048C703.447,482.298 703.832,482.648 704.046,483.098C704.259,483.548 704.377,484.223 704.398,485.123C704.42,486.023 704.388,486.986 704.302,488.011C704.217,489.036 704.12,490.036 704.014,491.011C703.907,491.986 703.832,492.723 703.789,493.223C703.576,495.973 703.383,498.736 703.212,501.511C703.041,504.286 702.999,507.073 703.084,509.873C703.084,510.273 703.106,510.836 703.148,511.561C703.191,512.286 703.255,513.023 703.341,513.773C703.426,514.523 703.544,515.236 703.693,515.911C703.843,516.586 704.024,517.073 704.238,517.373C704.665,517.923 705.178,518.348 705.776,518.648C706.375,518.948 706.973,519.098 707.571,519.098C708.169,519.098 708.736,518.936 709.27,518.611C709.804,518.286 710.242,517.798 710.584,517.148C710.926,516.448 711.171,515.723 711.321,514.973C711.471,514.223 711.588,513.473 711.674,512.723C712.101,509.573 712.25,506.386 712.122,503.161C711.994,499.936 711.823,496.723 711.609,493.523C711.567,492.973 711.513,492.211 711.449,491.236C711.385,490.261 711.342,489.248 711.321,488.198C711.3,487.148 711.332,486.161 711.417,485.236C711.503,484.311 711.674,483.623 711.93,483.173C712.229,482.723 712.635,482.386 713.148,482.161C713.661,481.936 714.152,481.773 714.622,481.673C715.776,481.423 716.94,481.361 718.116,481.486C719.291,481.611 720.455,481.673 721.609,481.673C722.079,481.673 722.581,481.736 723.115,481.861C723.65,481.986 724.088,482.248 724.429,482.648C724.899,483.198 725.177,483.873 725.263,484.673C725.348,485.473 725.434,486.273 725.519,487.073C725.605,488.073 725.626,489.098 725.583,490.148C725.54,491.198 725.54,492.248 725.583,493.298C725.669,496.298 725.701,499.273 725.679,502.223C725.658,505.173 725.562,508.148 725.391,511.148C725.305,513.248 725.092,515.348 724.75,517.448C724.408,519.548 723.895,521.598 723.212,523.598C722.784,524.848 722.271,526.061 721.673,527.236C721.075,528.411 720.37,529.473 719.558,530.423C718.575,531.573 717.475,532.548 716.257,533.348C715.039,534.148 713.746,534.748 712.379,535.148Z" style="fill:rgb(226,92,0);fill-rule:nonzero;"/>
|
|
8
|
+
<path d="M741.736,535.748C740.283,536.198 738.756,536.348 737.153,536.198C735.551,536.048 734.108,535.523 732.826,534.623C732.356,534.323 731.929,533.936 731.544,533.461C731.16,532.986 730.903,532.448 730.775,531.848C730.69,531.498 730.636,530.898 730.615,530.048C730.594,529.198 730.594,528.311 730.615,527.386C730.636,526.461 730.668,525.573 730.711,524.723C730.754,523.873 730.775,523.273 730.775,522.923C730.946,517.473 730.968,512.073 730.839,506.723C730.711,501.373 730.519,495.998 730.262,490.598C730.177,489.298 730.06,488.011 729.91,486.736C729.76,485.461 729.75,484.173 729.878,482.873C729.963,482.173 730.113,481.511 730.327,480.886C730.54,480.261 730.861,479.723 731.288,479.273C731.587,478.923 731.918,478.673 732.282,478.523C732.645,478.373 733.019,478.248 733.403,478.148C734.13,477.948 734.888,477.836 735.679,477.811C736.469,477.786 737.249,477.748 738.019,477.698C739.258,477.698 740.508,477.723 741.768,477.773C743.029,477.823 744.279,477.873 745.518,477.923C746.971,478.023 748.413,478.011 749.845,477.886C751.277,477.761 752.74,477.698 754.236,477.698C756.202,477.648 758.167,477.923 760.133,478.523C762.099,479.123 763.915,480.023 765.582,481.223C767.291,482.423 768.637,484.086 769.62,486.211C770.603,488.336 771.265,490.648 771.607,493.148C771.949,495.648 772.013,498.223 771.799,500.873C771.586,503.523 771.137,505.923 770.453,508.073C769.727,510.173 768.733,512.161 767.472,514.036C766.212,515.911 764.727,517.348 763.018,518.348C763.402,519.648 763.915,520.886 764.556,522.061C765.197,523.236 765.945,524.323 766.799,525.323C767.611,526.173 768.498,526.923 769.46,527.573C770.421,528.223 771.286,529.023 772.056,529.973C772.568,530.673 772.803,531.398 772.761,532.148C772.718,532.598 772.6,533.036 772.408,533.461C772.216,533.886 771.991,534.273 771.735,534.623C771.521,534.923 771.169,535.161 770.677,535.336C770.186,535.511 769.652,535.636 769.075,535.711C768.498,535.786 767.932,535.848 767.376,535.898C766.821,535.948 766.372,535.973 766.03,535.973C765.09,535.973 764.161,535.998 763.242,536.048C762.323,536.098 761.394,536.073 760.454,535.973C759.855,535.873 759.246,535.711 758.627,535.486C758.007,535.261 757.441,534.948 756.928,534.548C756.073,533.848 755.336,533.036 754.717,532.111C754.097,531.186 753.531,530.223 753.018,529.223C752.291,527.773 751.629,526.286 751.031,524.761C750.433,523.236 749.813,521.723 749.172,520.223C749.086,520.173 748.905,520.148 748.627,520.148C748.349,520.148 748.168,520.173 748.082,520.223C748.04,521.873 747.965,523.548 747.858,525.248C747.751,526.948 747.505,528.598 747.121,530.198C746.822,531.548 746.138,532.711 745.07,533.686C744.001,534.661 742.89,535.348 741.736,535.748ZM748.146,506.123C749.3,506.173 750.465,506.161 751.64,506.086C752.815,506.011 753.894,505.648 754.877,504.998C755.945,504.198 756.629,503.023 756.928,501.473C757.099,500.773 757.206,499.961 757.249,499.036C757.291,498.111 757.259,497.211 757.152,496.336C757.046,495.461 756.843,494.648 756.543,493.898C756.244,493.148 755.838,492.573 755.326,492.173C754.556,491.623 753.638,491.298 752.569,491.198C751.843,491.148 751.106,491.186 750.358,491.311C749.61,491.436 748.873,491.598 748.146,491.798C748.146,492.248 748.157,493.161 748.178,494.536C748.2,495.911 748.21,497.386 748.21,498.961C748.21,500.536 748.2,502.011 748.178,503.386C748.157,504.761 748.146,505.673 748.146,506.123Z" style="fill:rgb(226,92,0);fill-rule:nonzero;"/>
|
|
9
|
+
<path d="M788.529,536.573C787.205,537.023 785.826,537.236 784.395,537.211C782.963,537.186 781.606,536.898 780.324,536.348C779.983,536.198 779.63,535.973 779.267,535.673C778.904,535.373 778.551,535.036 778.209,534.661C777.867,534.286 777.579,533.886 777.344,533.461C777.109,533.036 776.97,532.623 776.927,532.223C776.884,531.923 776.863,531.386 776.863,530.611C776.863,529.836 776.874,529.011 776.895,528.136C776.917,527.261 776.938,526.436 776.959,525.661C776.981,524.886 776.991,524.348 776.991,524.048C777.077,521.348 777.109,518.673 777.087,516.023C777.066,513.373 777.055,510.698 777.055,507.998L777.055,504.098C777.055,502.798 777.013,501.498 776.927,500.198C776.799,498.598 776.714,497.023 776.671,495.473C776.628,493.923 776.564,492.348 776.478,490.748C776.436,489.898 776.382,489.036 776.318,488.161C776.254,487.286 776.179,486.423 776.094,485.573C776.051,484.873 776.073,484.173 776.158,483.473C776.243,482.773 776.414,482.123 776.671,481.523C777.013,480.673 777.483,480.048 778.081,479.648C778.337,479.448 778.604,479.311 778.882,479.236C779.16,479.161 779.47,479.073 779.812,478.973C780.752,478.823 781.692,478.736 782.632,478.711C783.572,478.686 784.512,478.673 785.452,478.673C786.435,478.723 787.45,478.848 788.497,479.048C789.544,479.248 790.495,479.648 791.35,480.248C791.777,480.548 792.162,480.911 792.503,481.336C792.845,481.761 793.123,482.248 793.337,482.798C793.593,483.348 793.775,483.923 793.882,484.523C793.988,485.123 794.085,485.723 794.17,486.323C794.426,488.623 794.555,490.911 794.555,493.186C794.555,495.461 794.533,497.723 794.491,499.973C794.491,500.473 794.48,501.361 794.459,502.636C794.437,503.911 794.426,505.361 794.426,506.986C794.426,508.611 794.416,510.336 794.394,512.161C794.373,513.986 794.352,515.711 794.33,517.336C794.309,518.961 794.288,520.411 794.266,521.686C794.245,522.961 794.234,523.848 794.234,524.348C794.149,525.348 794.074,526.323 794.01,527.273C793.946,528.223 793.807,529.198 793.593,530.198C793.465,530.898 793.294,531.586 793.08,532.261C792.867,532.936 792.546,533.548 792.119,534.098C791.649,534.698 791.104,535.198 790.484,535.598C789.865,535.998 789.213,536.323 788.529,536.573Z" style="fill:white;fill-rule:nonzero;"/>
|
|
10
|
+
<path d="M788.529,536.573C787.205,537.023 785.826,537.236 784.395,537.211C782.963,537.186 781.606,536.898 780.324,536.348C779.983,536.198 779.63,535.973 779.267,535.673C778.904,535.373 778.551,535.036 778.209,534.661C777.867,534.286 777.579,533.886 777.344,533.461C777.109,533.036 776.97,532.623 776.927,532.223C776.884,531.923 776.863,531.386 776.863,530.611C776.863,529.836 776.874,529.011 776.895,528.136C776.917,527.261 776.938,526.436 776.959,525.661C776.981,524.886 776.991,524.348 776.991,524.048C777.077,521.348 777.109,518.673 777.087,516.023C777.066,513.373 777.055,510.698 777.055,507.998L777.055,504.098C777.055,502.798 777.013,501.498 776.927,500.198C776.799,498.598 776.714,497.023 776.671,495.473C776.628,493.923 776.564,492.348 776.478,490.748C776.436,489.898 776.382,489.036 776.318,488.161C776.254,487.286 776.179,486.423 776.094,485.573C776.051,484.873 776.073,484.173 776.158,483.473C776.243,482.773 776.414,482.123 776.671,481.523C777.013,480.673 777.483,480.048 778.081,479.648C778.337,479.448 778.604,479.311 778.882,479.236C779.16,479.161 779.47,479.073 779.812,478.973C780.752,478.823 781.692,478.736 782.632,478.711C783.572,478.686 784.512,478.673 785.452,478.673C786.435,478.723 787.45,478.848 788.497,479.048C789.544,479.248 790.495,479.648 791.35,480.248C791.777,480.548 792.162,480.911 792.503,481.336C792.845,481.761 793.123,482.248 793.337,482.798C793.593,483.348 793.775,483.923 793.882,484.523C793.988,485.123 794.085,485.723 794.17,486.323C794.426,488.623 794.555,490.911 794.555,493.186C794.555,495.461 794.533,497.723 794.491,499.973C794.491,500.473 794.48,501.361 794.459,502.636C794.437,503.911 794.426,505.361 794.426,506.986C794.426,508.611 794.416,510.336 794.394,512.161C794.373,513.986 794.352,515.711 794.33,517.336C794.309,518.961 794.288,520.411 794.266,521.686C794.245,522.961 794.234,523.848 794.234,524.348C794.149,525.348 794.074,526.323 794.01,527.273C793.946,528.223 793.807,529.198 793.593,530.198C793.465,530.898 793.294,531.586 793.08,532.261C792.867,532.936 792.546,533.548 792.119,534.098C791.649,534.698 791.104,535.198 790.484,535.598C789.865,535.998 789.213,536.323 788.529,536.573ZM788.324,535.775C788.959,535.543 789.564,535.24 790.14,534.869C790.691,534.513 791.175,534.069 791.593,533.536C791.957,533.068 792.23,532.546 792.412,531.971C792.614,531.334 792.776,530.685 792.897,530.024L792.902,529.996C793.106,529.043 793.239,528.113 793.3,527.208C793.363,526.265 793.437,525.298 793.522,524.312C793.522,523.803 793.533,522.922 793.554,521.669C793.575,520.395 793.597,518.947 793.618,517.323C793.64,515.698 793.661,513.974 793.682,512.149C793.704,510.328 793.714,508.607 793.714,506.986C793.714,505.355 793.725,503.899 793.746,502.619C793.768,501.352 793.778,500.47 793.778,499.973L793.779,499.955C793.821,497.711 793.842,495.455 793.842,493.186C793.842,490.951 793.717,488.705 793.465,486.44C793.381,485.858 793.288,485.275 793.184,484.693C793.092,484.173 792.934,483.674 792.711,483.197L792.688,483.143C792.508,482.678 792.274,482.266 791.985,481.907C791.688,481.538 791.354,481.223 790.983,480.963C790.204,480.416 789.337,480.053 788.382,479.871C787.37,479.677 786.388,479.556 785.432,479.507C784.504,479.507 783.576,479.519 782.648,479.544C781.747,479.568 780.847,479.651 779.947,479.793C779.615,479.889 779.314,479.974 779.042,480.048C778.846,480.101 778.658,480.2 778.476,480.342L778.434,480.372C777.956,480.691 777.588,481.199 777.315,481.878L777.308,481.896C777.085,482.417 776.937,482.983 776.863,483.591C776.786,484.226 776.766,484.861 776.803,485.49C776.888,486.344 776.963,487.211 777.028,488.09C777.092,488.972 777.146,489.841 777.189,490.698C777.275,492.306 777.34,493.889 777.383,495.446C777.425,496.98 777.509,498.538 777.636,500.12L777.637,500.134C777.724,501.456 777.768,502.777 777.768,504.098L777.768,507.998C777.768,510.696 777.778,513.368 777.8,516.015C777.821,518.673 777.789,521.356 777.704,524.058C777.703,524.365 777.693,524.908 777.671,525.688C777.65,526.462 777.628,527.286 777.607,528.16C777.586,529.026 777.575,529.843 777.575,530.611C777.575,531.32 777.591,531.812 777.63,532.086L777.634,532.12C777.665,532.408 777.772,532.702 777.942,533.008C778.147,533.378 778.398,533.726 778.696,534.053C779.014,534.401 779.341,534.714 779.678,534.992C779.985,535.247 780.283,535.44 780.572,535.567C781.78,536.085 783.057,536.354 784.405,536.377C785.762,536.401 787.068,536.201 788.324,535.775Z" style="fill:rgb(226,92,0);"/>
|
|
11
|
+
<path d="M809.554,537.923C808.571,538.073 807.567,538.086 806.541,537.961C805.516,537.836 804.511,537.573 803.529,537.173C803.187,537.023 802.834,536.798 802.471,536.498C802.108,536.198 801.755,535.861 801.413,535.486C801.071,535.111 800.783,534.711 800.548,534.286C800.313,533.861 800.174,533.448 800.131,533.048C800.089,532.748 800.067,532.211 800.067,531.436C800.067,530.661 800.078,529.836 800.099,528.961C800.121,528.086 800.142,527.261 800.163,526.486C800.185,525.711 800.195,525.173 800.195,524.873C800.281,522.323 800.324,519.798 800.324,517.298C800.324,514.798 800.302,512.273 800.26,509.723C800.217,508.273 800.217,506.823 800.26,505.373C800.302,503.923 800.26,502.473 800.131,501.023C800.003,499.423 799.918,497.848 799.875,496.298C799.832,494.748 799.768,493.173 799.683,491.573C799.64,490.723 799.586,489.861 799.522,488.986C799.458,488.111 799.384,487.248 799.298,486.398C799.255,485.698 799.277,484.998 799.362,484.298C799.448,483.598 799.619,482.948 799.875,482.348C800.217,481.498 800.687,480.873 801.285,480.473C801.542,480.273 801.809,480.136 802.086,480.061C802.364,479.986 802.674,479.898 803.016,479.798C803.956,479.648 804.896,479.561 805.836,479.536C806.776,479.511 807.716,479.498 808.657,479.498C809.469,479.548 810.28,479.636 811.092,479.761C811.904,479.886 812.695,480.123 813.464,480.473C813.934,480.723 814.372,480.998 814.778,481.298C815.184,481.598 815.558,481.973 815.9,482.423C816.071,482.623 816.199,482.836 816.285,483.061C816.37,483.286 816.498,483.523 816.669,483.773C817.011,484.323 817.524,485.261 818.207,486.586C818.891,487.911 819.639,489.436 820.451,491.161C821.263,492.886 822.118,494.711 823.015,496.636C823.912,498.561 824.756,500.386 825.547,502.111C826.337,503.836 827.043,505.386 827.662,506.761C828.282,508.136 828.72,509.123 828.976,509.723C830.002,506.473 831.027,503.236 832.053,500.011C833.079,496.786 834.147,493.573 835.258,490.373C835.685,489.223 836.123,488.086 836.572,486.961C837.021,485.836 837.544,484.748 838.143,483.698C838.57,482.998 839.051,482.336 839.585,481.711C840.119,481.086 840.728,480.648 841.412,480.398C841.754,479.998 842.127,479.711 842.533,479.536C842.939,479.361 843.377,479.223 843.847,479.123C844.788,478.923 845.717,478.811 846.636,478.786C847.555,478.761 848.505,478.773 849.488,478.823C850.471,478.823 851.475,478.923 852.501,479.123C853.527,479.323 854.467,479.748 855.321,480.398C855.749,480.698 856.144,481.048 856.507,481.448C856.87,481.848 857.159,482.323 857.373,482.873C857.8,483.923 858.078,485.123 858.206,486.473C858.462,488.723 858.59,490.986 858.59,493.261C858.59,495.536 858.569,497.823 858.526,500.123C858.526,500.623 858.516,501.511 858.494,502.786C858.473,504.061 858.462,505.511 858.462,507.136C858.462,508.761 858.452,510.473 858.43,512.273C858.409,514.073 858.387,515.786 858.366,517.411C858.345,519.036 858.323,520.486 858.302,521.761C858.281,523.036 858.27,523.923 858.27,524.423C858.184,525.423 858.11,526.398 858.046,527.348C857.981,528.298 857.843,529.273 857.629,530.273C857.458,531.073 857.234,531.873 856.956,532.673C856.678,533.473 856.261,534.148 855.706,534.698C854.766,535.698 853.644,536.386 852.341,536.761C851.037,537.136 849.766,537.323 848.527,537.323C847.416,537.273 846.273,537.073 845.097,536.723C843.922,536.373 842.95,535.723 842.181,534.773C841.967,534.523 841.754,534.248 841.54,533.948C841.326,533.648 841.177,533.298 841.091,532.898C841.006,532.698 840.952,532.348 840.931,531.848C840.91,531.348 840.899,530.811 840.899,530.236C840.899,529.661 840.91,529.123 840.931,528.623C840.952,528.123 840.963,527.773 840.963,527.573C841.048,525.023 841.113,522.473 841.155,519.923C841.198,517.373 841.198,514.823 841.155,512.273C840.386,514.423 839.628,516.561 838.88,518.686C838.132,520.811 837.373,522.923 836.604,525.023C836.476,525.323 836.294,525.898 836.059,526.748C835.824,527.598 835.579,528.486 835.322,529.411C835.066,530.336 834.799,531.198 834.521,531.998C834.243,532.798 834.019,533.323 833.848,533.573C833.506,534.123 833.036,534.536 832.438,534.811C831.839,535.086 831.241,535.273 830.643,535.373C830.472,535.373 830.151,535.386 829.681,535.411C829.211,535.436 828.72,535.461 828.207,535.486C827.694,535.511 827.203,535.523 826.733,535.523L825.771,535.523C825.301,535.523 824.938,535.348 824.682,534.998C824.596,534.898 824.5,534.698 824.393,534.398C824.286,534.098 824.179,533.786 824.073,533.461C823.966,533.136 823.859,532.823 823.752,532.523C823.645,532.223 823.571,531.998 823.528,531.848C823.4,531.498 823.165,530.773 822.823,529.673C822.481,528.573 822.128,527.398 821.765,526.148C821.402,524.898 821.049,523.723 820.707,522.623C820.366,521.523 820.13,520.798 820.002,520.448C819.917,520.248 819.757,519.873 819.522,519.323C819.287,518.773 819.041,518.186 818.784,517.561C818.528,516.936 818.282,516.348 818.047,515.798C817.812,515.248 817.652,514.873 817.566,514.673C817.524,517.223 817.502,519.761 817.502,522.286C817.502,524.811 817.331,527.348 816.99,529.898C816.861,530.748 816.69,531.598 816.477,532.448C816.263,533.298 815.921,534.048 815.451,534.698C814.767,535.698 813.891,536.448 812.823,536.948C811.755,537.448 810.665,537.773 809.554,537.923Z" style="fill:rgb(226,92,0);fill-rule:nonzero;"/>
|
|
12
|
+
<path d="M875.705,536.573C874.38,537.023 873.002,537.236 871.571,537.211C870.139,537.186 868.782,536.898 867.5,536.348C867.158,536.198 866.806,535.973 866.443,535.673C866.079,535.373 865.727,535.036 865.385,534.661C865.043,534.286 864.755,533.886 864.52,533.461C864.285,533.036 864.146,532.623 864.103,532.223C864.06,531.923 864.039,531.386 864.039,530.611C864.039,529.836 864.05,529.011 864.071,528.136C864.092,527.261 864.114,526.436 864.135,525.661C864.156,524.886 864.167,524.348 864.167,524.048C864.253,521.348 864.285,518.673 864.263,516.023C864.242,513.373 864.231,510.698 864.231,507.998L864.231,504.098C864.231,502.798 864.188,501.498 864.103,500.198C863.975,498.598 863.889,497.023 863.847,495.473C863.804,493.923 863.74,492.348 863.654,490.748C863.612,489.898 863.558,489.036 863.494,488.161C863.43,487.286 863.355,486.423 863.27,485.573C863.227,484.873 863.248,484.173 863.334,483.473C863.419,482.773 863.59,482.123 863.847,481.523C864.188,480.673 864.659,480.048 865.257,479.648C865.513,479.448 865.78,479.311 866.058,479.236C866.336,479.161 866.646,479.073 866.987,478.973C867.928,478.823 868.868,478.736 869.808,478.711C870.748,478.686 871.688,478.673 872.628,478.673C873.611,478.723 874.626,478.848 875.673,479.048C876.72,479.248 877.671,479.648 878.525,480.248C878.953,480.548 879.337,480.911 879.679,481.336C880.021,481.761 880.299,482.248 880.513,482.798C880.769,483.348 880.951,483.923 881.057,484.523C881.164,485.123 881.26,485.723 881.346,486.323C881.602,488.623 881.73,490.911 881.73,493.186C881.73,495.461 881.709,497.723 881.666,499.973C881.666,500.473 881.656,501.361 881.634,502.636C881.613,503.911 881.602,505.361 881.602,506.986C881.602,508.611 881.592,510.336 881.57,512.161C881.549,513.986 881.527,515.711 881.506,517.336C881.485,518.961 881.463,520.411 881.442,521.686C881.421,522.961 881.41,523.848 881.41,524.348C881.324,525.348 881.25,526.323 881.186,527.273C881.122,528.223 880.983,529.198 880.769,530.198C880.641,530.898 880.47,531.586 880.256,532.261C880.042,532.936 879.722,533.548 879.295,534.098C878.825,534.698 878.28,535.198 877.66,535.598C877.04,535.998 876.389,536.323 875.705,536.573Z" style="fill:white;fill-rule:nonzero;"/>
|
|
13
|
+
<path d="M875.705,536.573C874.38,537.023 873.002,537.236 871.571,537.211C870.139,537.186 868.782,536.898 867.5,536.348C867.158,536.198 866.806,535.973 866.443,535.673C866.079,535.373 865.727,535.036 865.385,534.661C865.043,534.286 864.755,533.886 864.52,533.461C864.285,533.036 864.146,532.623 864.103,532.223C864.06,531.923 864.039,531.386 864.039,530.611C864.039,529.836 864.05,529.011 864.071,528.136C864.092,527.261 864.114,526.436 864.135,525.661C864.156,524.886 864.167,524.348 864.167,524.048C864.253,521.348 864.285,518.673 864.263,516.023C864.242,513.373 864.231,510.698 864.231,507.998L864.231,504.098C864.231,502.798 864.188,501.498 864.103,500.198C863.975,498.598 863.889,497.023 863.847,495.473C863.804,493.923 863.74,492.348 863.654,490.748C863.612,489.898 863.558,489.036 863.494,488.161C863.43,487.286 863.355,486.423 863.27,485.573C863.227,484.873 863.248,484.173 863.334,483.473C863.419,482.773 863.59,482.123 863.847,481.523C864.188,480.673 864.659,480.048 865.257,479.648C865.513,479.448 865.78,479.311 866.058,479.236C866.336,479.161 866.646,479.073 866.987,478.973C867.928,478.823 868.868,478.736 869.808,478.711C870.748,478.686 871.688,478.673 872.628,478.673C873.611,478.723 874.626,478.848 875.673,479.048C876.72,479.248 877.671,479.648 878.525,480.248C878.953,480.548 879.337,480.911 879.679,481.336C880.021,481.761 880.299,482.248 880.513,482.798C880.769,483.348 880.951,483.923 881.057,484.523C881.164,485.123 881.26,485.723 881.346,486.323C881.602,488.623 881.73,490.911 881.73,493.186C881.73,495.461 881.709,497.723 881.666,499.973C881.666,500.473 881.656,501.361 881.634,502.636C881.613,503.911 881.602,505.361 881.602,506.986C881.602,508.611 881.592,510.336 881.57,512.161C881.549,513.986 881.527,515.711 881.506,517.336C881.485,518.961 881.463,520.411 881.442,521.686C881.421,522.961 881.41,523.848 881.41,524.348C881.324,525.348 881.25,526.323 881.186,527.273C881.122,528.223 880.983,529.198 880.769,530.198C880.641,530.898 880.47,531.586 880.256,532.261C880.042,532.936 879.722,533.548 879.295,534.098C878.825,534.698 878.28,535.198 877.66,535.598C877.04,535.998 876.389,536.323 875.705,536.573ZM875.499,535.775C876.135,535.543 876.74,535.24 877.316,534.869C877.867,534.513 878.351,534.069 878.769,533.536C879.133,533.068 879.406,532.546 879.588,531.971C879.79,531.334 879.951,530.685 880.073,530.024L880.078,529.996C880.282,529.043 880.414,528.113 880.476,527.208C880.539,526.265 880.613,525.298 880.698,524.312C880.698,523.803 880.709,522.922 880.73,521.669C880.751,520.395 880.773,518.947 880.794,517.323C880.815,515.698 880.837,513.974 880.858,512.149C880.879,510.328 880.89,508.607 880.89,506.986C880.89,505.355 880.901,503.899 880.922,502.619C880.943,501.352 880.954,500.47 880.954,499.973L880.954,499.955C880.997,497.711 881.018,495.455 881.018,493.186C881.018,490.951 880.893,488.705 880.64,486.44C880.557,485.858 880.464,485.275 880.36,484.693C880.268,484.173 880.11,483.674 879.887,483.197L879.864,483.143C879.684,482.678 879.449,482.266 879.161,481.907C878.864,481.538 878.53,481.223 878.159,480.963C877.38,480.416 876.513,480.053 875.558,479.871C874.545,479.677 873.563,479.556 872.608,479.507C871.68,479.507 870.752,479.519 869.824,479.544C868.923,479.568 868.022,479.651 867.123,479.793C866.791,479.889 866.49,479.974 866.218,480.048C866.022,480.101 865.833,480.2 865.652,480.342L865.61,480.372C865.132,480.691 864.764,481.199 864.491,481.878L864.484,481.896C864.261,482.417 864.113,482.983 864.039,483.591C863.961,484.226 863.941,484.861 863.979,485.49C864.064,486.344 864.139,487.211 864.204,488.09C864.268,488.972 864.322,489.841 864.365,490.698C864.451,492.306 864.516,493.889 864.558,495.446C864.601,496.98 864.685,498.538 864.812,500.12L864.813,500.134C864.9,501.456 864.943,502.777 864.943,504.098L864.943,507.998C864.943,510.696 864.954,513.368 864.975,516.015C864.997,518.673 864.965,521.356 864.879,524.058C864.879,524.365 864.868,524.908 864.847,525.688C864.826,526.462 864.804,527.286 864.783,528.16C864.762,529.026 864.751,529.843 864.751,530.611C864.751,531.32 864.766,531.812 864.806,532.086L864.81,532.12C864.841,532.408 864.948,532.702 865.118,533.008C865.322,533.378 865.574,533.726 865.872,534.053C866.189,534.401 866.516,534.714 866.853,534.992C867.161,535.247 867.459,535.44 867.748,535.567C868.956,536.085 870.233,536.354 871.581,536.377C872.938,536.401 874.244,536.201 875.499,535.775Z" style="fill:rgb(226,92,0);"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g transform="matrix(0.237829,0,0,0.183138,708.927,486.3)">
|
|
16
|
+
<path d="M235.967,-4.164C240.592,-4.3 251.682,315.405 244.639,315.268C237.596,315.132 230.921,313.562 224.614,310.559C222.932,309.74 221.198,308.511 219.411,306.873C217.624,305.235 215.889,303.392 214.207,301.344C212.526,299.297 211.107,297.113 209.95,294.792C208.794,292.471 208.111,290.219 207.9,288.035C207.69,286.397 207.585,283.462 207.585,279.23C207.585,274.998 207.638,270.493 207.743,265.715C207.848,260.938 207.953,256.433 208.058,252.201C208.163,247.969 208.216,245.034 208.216,243.396C208.636,228.653 208.794,214.047 208.689,199.577C208.584,185.107 208.531,170.5 208.531,155.757L208.531,134.462C208.531,127.363 208.321,120.265 207.9,113.166C207.27,104.43 206.849,95.83 206.639,87.366C206.429,78.902 206.113,70.302 205.693,61.566C205.483,56.924 205.22,52.215 204.905,47.437C204.589,42.659 204.221,37.95 203.801,33.308C203.591,29.486 203.696,25.664 204.116,21.841C204.537,18.019 205.378,14.47 206.639,11.194C208.321,6.552 210.634,3.14 213.577,0.956C214.838,-0.137 216.152,-0.887 217.519,-1.297C218.885,-1.706 220.409,-2.184 222.091,-2.73C226.716,-3.549 231.342,-4.027 235.967,-4.164Z" style="fill:rgb(226,92,0);fill-rule:nonzero;"/>
|
|
17
|
+
</g>
|
|
18
|
+
<g transform="matrix(0.237829,0,0,0.183138,810.87,486.3)">
|
|
19
|
+
<path d="M235.967,-4.164C240.592,-4.3 251.682,315.405 244.639,315.268C237.596,315.132 230.921,313.562 224.614,310.559C222.932,309.74 221.198,308.511 219.411,306.873C217.624,305.235 215.889,303.392 214.207,301.344C212.526,299.297 211.107,297.113 209.95,294.792C208.794,292.471 208.111,290.219 207.9,288.035C207.69,286.397 207.585,283.462 207.585,279.23C207.585,274.998 207.638,270.493 207.743,265.715C207.848,260.938 207.953,256.433 208.058,252.201C208.163,247.969 208.216,245.034 208.216,243.396C208.636,228.653 208.794,214.047 208.689,199.577C208.584,185.107 208.531,170.5 208.531,155.757L208.531,134.462C208.531,127.363 208.321,120.265 207.9,113.166C207.27,104.43 206.849,95.83 206.639,87.366C206.429,78.902 206.113,70.302 205.693,61.566C205.483,56.924 205.22,52.215 204.905,47.437C204.589,42.659 204.221,37.95 203.801,33.308C203.591,29.486 203.696,25.664 204.116,21.841C204.537,18.019 205.378,14.47 206.639,11.194C208.321,6.552 210.634,3.14 213.577,0.956C214.838,-0.137 216.152,-0.887 217.519,-1.297C218.885,-1.706 220.409,-2.184 222.091,-2.73C226.716,-3.549 231.342,-4.027 235.967,-4.164Z" style="fill:rgb(226,92,0);fill-rule:nonzero;"/>
|
|
20
|
+
</g>
|
|
21
|
+
<g transform="matrix(1.07591,0,0,1,-77.8024,0.980665)">
|
|
22
|
+
<rect x="537.037" y="467.247" width="453.277" height="91.62" style="fill:none;"/>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</svg>
|
surimi-0.0.0/lib/cli.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
from .registration import discover_tests
|
|
5
|
+
from .runner import run_tests
|
|
6
|
+
|
|
7
|
+
@click.command()
|
|
8
|
+
@click.option('-v', '--verbose', default=0, nargs=1, type=int)
|
|
9
|
+
@click.argument('directory', default='.', nargs=1, type=str)
|
|
10
|
+
def test(verbose, directory):
|
|
11
|
+
root = os.path.abspath(directory)
|
|
12
|
+
sys.path.insert(0, root)
|
|
13
|
+
import surimi
|
|
14
|
+
tests = surimi.Test()
|
|
15
|
+
surimi.test = tests
|
|
16
|
+
discover_tests(directory)
|
|
17
|
+
run_tests(tests, verbose=verbose)
|
|
18
|
+
|
|
19
|
+
if __name__ == '__main__':
|
|
20
|
+
test()
|
surimi-0.0.0/lib/data.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from rich.console import Console
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from typing import Any, Callable
|
|
4
|
+
|
|
5
|
+
@dataclass
|
|
6
|
+
class TestInfos:
|
|
7
|
+
function: Callable[[], None]
|
|
8
|
+
name: str
|
|
9
|
+
location: str
|
|
10
|
+
fail_with: Exception
|
|
11
|
+
|
|
12
|
+
def __call__(self):
|
|
13
|
+
self.function()
|
|
14
|
+
|
|
15
|
+
class Test:
|
|
16
|
+
def __init__(self):
|
|
17
|
+
self.registered_tests: list[TestInfos] = {}
|
|
18
|
+
|
|
19
|
+
def add_function(self, fun, **kwargs):
|
|
20
|
+
fail_with = kwargs.get('fail_with')
|
|
21
|
+
test = TestInfos(fun, fun.__name__, fun.__globals__['__file__'], fail_with)
|
|
22
|
+
module_name = fun.__globals__['__name__']
|
|
23
|
+
if module_name not in self.registered_tests:
|
|
24
|
+
self.registered_tests[module_name] = []
|
|
25
|
+
self.registered_tests[module_name].append(test)
|
|
26
|
+
|
|
27
|
+
def __call__(self, *args, **kwargs):
|
|
28
|
+
#@test
|
|
29
|
+
if args and callable(args[0]):
|
|
30
|
+
self.add_function(args[0], **kwargs)
|
|
31
|
+
return args[0]
|
|
32
|
+
|
|
33
|
+
#@test(...)
|
|
34
|
+
def register(function):
|
|
35
|
+
self.add_function(function, **kwargs)
|
|
36
|
+
return function
|
|
37
|
+
|
|
38
|
+
return register
|
|
39
|
+
|
|
40
|
+
def proxy_test_decorator(*args, **kwargs):
|
|
41
|
+
if args and callable(args[0]):
|
|
42
|
+
function = args[0]
|
|
43
|
+
return function
|
|
44
|
+
|
|
45
|
+
def register(function):
|
|
46
|
+
return function
|
|
47
|
+
return register
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import traceback
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
from rich.panel import Panel
|
|
4
|
+
from rich.syntax import Syntax
|
|
5
|
+
from rich.text import Text
|
|
6
|
+
from .data import TestResult
|
|
7
|
+
|
|
8
|
+
def format_module_result(console: Console, num_module: int, total_modules: int, module: str, failed: bool, execution_time: float):
|
|
9
|
+
if not failed : status = Text("[bold][green]PASSED[/green][/bold]")
|
|
10
|
+
else: status = Text("[bold][red]FAILED[/red][/bold]")
|
|
11
|
+
time_str = f"{execution_time:.2f}s"
|
|
12
|
+
module = module.replace('.', '/')
|
|
13
|
+
console.print(f"{num_module}/{total_modules} {module:<35} {status} {time_str:>8}")
|
|
14
|
+
|
|
15
|
+
def format_failed(console: Console, test_result: TestResult, verbose: int):
|
|
16
|
+
error_name = type(test_result.exception).__name__
|
|
17
|
+
error = f'[red]{error_name}[/red]' if test_result.exception else "[green]No error[/green]"
|
|
18
|
+
expected = f', expected [red]{test_result.fail_with.__name__}[/red]' if test_result.fail_with else ''
|
|
19
|
+
|
|
20
|
+
console.print(f" -> [red]Test [bold]{test_result.name}[/bold] failed[/red]: got {error}{expected}")
|
|
21
|
+
|
|
22
|
+
if verbose >= 1:
|
|
23
|
+
if test_result.stdout:
|
|
24
|
+
console.print(f" [yellow]stdout:[/yellow]")
|
|
25
|
+
for line in test_result.stdout.strip().split('\n'):
|
|
26
|
+
console.print(f" {line}")
|
|
27
|
+
|
|
28
|
+
if test_result.stderr:
|
|
29
|
+
console.print(f" [yellow]stderr:[/yellow]")
|
|
30
|
+
for line in test_result.stderr.strip().split('\n'):
|
|
31
|
+
console.print(f" {line}")
|
|
32
|
+
|
|
33
|
+
if verbose >= 2:
|
|
34
|
+
if test_result.exception and test_result.exception.__traceback__:
|
|
35
|
+
console.print(f" [yellow]traceback:[/yellow]")
|
|
36
|
+
tb_lines = traceback.format_tb(test_result.exception.__traceback__)
|
|
37
|
+
for line in tb_lines:
|
|
38
|
+
for tb_line in line.strip().split('\n'):
|
|
39
|
+
console.print(f" {tb_line}")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import importlib
|
|
2
|
+
import sys
|
|
3
|
+
import os
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
def discover_tests(dir: str = '.'):
|
|
7
|
+
test_locations = [
|
|
8
|
+
dir,
|
|
9
|
+
os.path.join(dir, 'src'),
|
|
10
|
+
os.path.join(dir, 'tests'),
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
for test_location in test_locations:
|
|
14
|
+
if not os.path.isdir(test_location):
|
|
15
|
+
continue
|
|
16
|
+
|
|
17
|
+
for root, dirs, files in os.walk(test_location):
|
|
18
|
+
dirs[:] = [
|
|
19
|
+
d for d in dirs
|
|
20
|
+
if os.path.exists(os.path.join(root, d, "__init__.py"))
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
for file in files:
|
|
24
|
+
if file.endswith(".py"):
|
|
25
|
+
rel_path = os.path.relpath(os.path.join(root, file), dir)
|
|
26
|
+
module_name = rel_path.replace(os.sep, ".").replace(".py", "")
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
importlib.import_module(module_name)
|
|
30
|
+
except ImportError as e:
|
|
31
|
+
print(f"[red]Error importing {module_name}: {e}[/red]")
|
|
32
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
import sys
|
|
3
|
+
from io import StringIO
|
|
4
|
+
import time
|
|
5
|
+
from .data import TestResult
|
|
6
|
+
from .decorators import TestInfos, Test
|
|
7
|
+
from rich.console import Console
|
|
8
|
+
from .formater import format_module_result, format_failed
|
|
9
|
+
|
|
10
|
+
def run_single_test(test_info: TestInfos) -> TestResult:
|
|
11
|
+
old_stdout = sys.stdout
|
|
12
|
+
old_stderr = sys.stderr
|
|
13
|
+
captured_stdout = StringIO()
|
|
14
|
+
captured_stderr = StringIO()
|
|
15
|
+
|
|
16
|
+
try:
|
|
17
|
+
sys.stdout = captured_stdout
|
|
18
|
+
sys.stderr = captured_stderr
|
|
19
|
+
|
|
20
|
+
start_time = time.time()
|
|
21
|
+
test_info()
|
|
22
|
+
execution_time = time.time() - start_time
|
|
23
|
+
|
|
24
|
+
return TestResult(
|
|
25
|
+
name=test_info.name,
|
|
26
|
+
fail_with=test_info.fail_with,
|
|
27
|
+
location=test_info.location,
|
|
28
|
+
failed=test_info.fail_with != None,
|
|
29
|
+
stdout=captured_stdout.getvalue(),
|
|
30
|
+
stderr=captured_stderr.getvalue(),
|
|
31
|
+
execution_time=execution_time,
|
|
32
|
+
exception=None
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
except Exception as e:
|
|
36
|
+
execution_time = time.time() - start_time
|
|
37
|
+
return TestResult(
|
|
38
|
+
name=test_info.name,
|
|
39
|
+
fail_with=test_info.fail_with,
|
|
40
|
+
location=test_info.location,
|
|
41
|
+
failed=type(e) != test_info.fail_with,
|
|
42
|
+
stdout=captured_stdout.getvalue(),
|
|
43
|
+
stderr=captured_stderr.getvalue(),
|
|
44
|
+
execution_time=execution_time,
|
|
45
|
+
exception=e
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
finally:
|
|
49
|
+
sys.stdout = old_stdout
|
|
50
|
+
sys.stderr = old_stderr
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def run_tests(test: Test, verbose):
|
|
54
|
+
console = Console()
|
|
55
|
+
for num_module, module in enumerate(test.registered_tests):
|
|
56
|
+
tests = test.registered_tests[module]
|
|
57
|
+
results = []
|
|
58
|
+
failed = False
|
|
59
|
+
total_time = 0
|
|
60
|
+
for t in tests:
|
|
61
|
+
res = run_single_test(t)
|
|
62
|
+
if not res.failed: failed = True
|
|
63
|
+
total_time += res.execution_time
|
|
64
|
+
results.append(res)
|
|
65
|
+
|
|
66
|
+
format_module_result(console, num_module+1, len(test.registered_tests), module, not failed, total_time)
|
|
67
|
+
|
|
68
|
+
first = True
|
|
69
|
+
for res in results:
|
|
70
|
+
if res.failed: format_failed(console, res, verbose)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=80", "setuptools-scm>=8"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "surimi"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Simple test library fully written in python"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{name = "Nicolas Beuve", email = "nicolas@beuve.net"}]
|
|
14
|
+
dependencies = ["click", "rich"]
|
|
15
|
+
|
|
16
|
+
[project.scripts]
|
|
17
|
+
surimi = "surimi.cli:test"
|
|
18
|
+
|
|
19
|
+
[tool.setuptools]
|
|
20
|
+
packages = ["surimi", "surimi.decorators"]
|
|
21
|
+
package-dir = {"surimi" = "lib"}
|
surimi-0.0.0/setup.cfg
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: surimi
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Simple test library fully written in python
|
|
5
|
+
Author-email: Nicolas Beuve <nicolas@beuve.net>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: click
|
|
11
|
+
Requires-Dist: rich
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+

|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
LICENSE
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
.github/workflows/release.yml
|
|
6
|
+
docs/surimi.svg
|
|
7
|
+
lib/__init__.py
|
|
8
|
+
lib/cli.py
|
|
9
|
+
lib/data.py
|
|
10
|
+
lib/formater.py
|
|
11
|
+
lib/registration.py
|
|
12
|
+
lib/runner.py
|
|
13
|
+
lib/decorators/__init__.py
|
|
14
|
+
lib/decorators/test.py
|
|
15
|
+
surimi.egg-info/PKG-INFO
|
|
16
|
+
surimi.egg-info/SOURCES.txt
|
|
17
|
+
surimi.egg-info/dependency_links.txt
|
|
18
|
+
surimi.egg-info/entry_points.txt
|
|
19
|
+
surimi.egg-info/requires.txt
|
|
20
|
+
surimi.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
surimi
|