File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,11 @@ jobs:
140
140
path : dist/*.whl
141
141
if-no-files-found : ignore
142
142
143
+ - name : Running benchmark
144
+ run : |
145
+ python benchmark/telco_fractions.py
146
+ python benchmark/microbench.py create pydigits
147
+
143
148
non-Linux :
144
149
strategy :
145
150
# Allows for matrix sub-jobs to fail without canceling the rest
@@ -193,3 +198,8 @@ jobs:
193
198
name : wheels-${{ matrix.os }}
194
199
path : dist/*.whl
195
200
if-no-files-found : ignore
201
+
202
+ - name : Running benchmark
203
+ run : |
204
+ python benchmark/telco_fractions.py
205
+ python benchmark/microbench.py create pydigits
Original file line number Diff line number Diff line change 1
1
import datetime
2
2
import itertools
3
3
import operator
4
+ import os
4
5
import statistics
5
6
import timeit
6
7
from collections import defaultdict
7
8
8
9
from decimal import Decimal
9
10
from fractions import Fraction as PyFraction
10
- from quicktions import Fraction as QFraction
11
+
12
+ def rel_path (* path ):
13
+ return os .path .join (os .path .dirname (__file__ ), * path )
14
+
15
+ try :
16
+ from quicktions import Fraction as QFraction
17
+ except ImportError :
18
+ import sys
19
+ sys .path .insert (0 , rel_path ('..' , 'src' ))
20
+ from quicktions import Fraction as QFraction
11
21
12
22
PyFraction .__name__ = "PyFraction"
13
23
You can’t perform that action at this time.
0 commit comments