File tree 3 files changed +10
-9
lines changed
3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 25
25
wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
26
26
sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
27
27
28
- - name : Install locales for tests
29
- run : sudo apt-get install tzdata locales -y && sudo locale-gen pt_PT && sudo update-locale # add pt_PT locale that is used in tests
30
-
31
28
- name : Setup python ${{ matrix.python-version }}
32
29
uses : actions/setup-python@v4
33
30
with :
Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
### Added
5
+ - Added check for pt_PT locale in test_model.py
5
6
### Fixed
6
7
### Changed
7
8
### Removed
Original file line number Diff line number Diff line change @@ -347,15 +347,18 @@ def test_locale():
347
347
import locale
348
348
349
349
m = Model ()
350
- x = m .addVar (lb = 1.1 )
351
-
352
- locale .setlocale (locale .LC_NUMERIC , "pt_PT" )
353
-
350
+ m .addVar (lb = 1.1 )
351
+
352
+ try :
353
+ locale .setlocale (locale .LC_NUMERIC , "pt_PT" )
354
+ except Exception :
355
+ pytest .skip ("pt_PT locale was not found. It might need to be installed." )
356
+
354
357
assert locale .str (1.1 ) == "1,1"
355
-
358
+
356
359
m .writeProblem ("model.cip" )
357
360
358
361
with open ("model.cip" ) as file :
359
362
assert "1,1" not in file .read ()
360
363
361
- locale .setlocale (locale .LC_NUMERIC ,"" )
364
+ locale .setlocale (locale .LC_NUMERIC ,"" )
You can’t perform that action at this time.
0 commit comments