File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 2525 wget --quiet --no-check-certificate https://github.com/scipopt/scip/releases/download/$(echo "v${{env.version}}" | tr -d '.')/SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
2626 sudo apt-get update && sudo apt install -y ./SCIPOptSuite-${{ env.version }}-Linux-ubuntu20.deb
2727
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-
3128 - name : Setup python ${{ matrix.python-version }}
3229 uses : actions/setup-python@v4
3330 with :
Original file line number Diff line number Diff line change 22
33## Unreleased
44### Added
5+ - Added check for pt_PT locale in test_model.py
56### Fixed
67### Changed
78### Removed
Original file line number Diff line number Diff line change @@ -347,15 +347,18 @@ def test_locale():
347347 import locale
348348
349349 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+
354357 assert locale .str (1.1 ) == "1,1"
355-
358+
356359 m .writeProblem ("model.cip" )
357360
358361 with open ("model.cip" ) as file :
359362 assert "1,1" not in file .read ()
360363
361- locale .setlocale (locale .LC_NUMERIC ,"" )
364+ locale .setlocale (locale .LC_NUMERIC ,"" )
You can’t perform that action at this time.
0 commit comments