Skip to content

Commit

Permalink
test update?
Browse files Browse the repository at this point in the history
  • Loading branch information
toruseo committed Mar 25, 2024
1 parent 71d606f commit 1979c81
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.9"
- name: Install uxsim and dependencies
run: pip install .
- name: Install pytest other dependencies
Expand Down
8 changes: 5 additions & 3 deletions tests/test_result_gui_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_result_gui_viewer():
name="", # Scenario name
deltan=5, # Simulation aggregation unit delta n
tmax=1200, # Total simulation time (s)
print_mode=1, save_mode=1, show_mode=1, # Various options
random_seed=0 # Set the random seed
print_mode=0, save_mode=0, show_mode=0, # Various options
random_seed=None # Set the random seed
)

# Define the scenario
Expand Down Expand Up @@ -43,4 +43,6 @@ def test_result_gui_viewer():
timer = QTimer()
timer.timeout.connect(window.close)
timer.start(1000*5)
sys.exit(app.exec_())
assert True
with pytest.raises(SystemExit):
sys.exit(app.exec_())
2 changes: 1 addition & 1 deletion uxsim/ResultGUIViewer/ResultGUIViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def paint(self, painter, option, widget):

c = colormaps["viridis"](speed/self.Link.u)
#color = QColor(int(density/self.Link.jam_density * 255), int(density/self.Link.jam_density * 255), 0, 255)
color = QColor(c[0]*255, c[1]*255, c[2]*255, 255)
color = QColor(int(c[0]*255), int(c[1]*255), int(c[2]*255), 255)
pen = QPen(color, lw)
painter.setPen(pen)

Expand Down

0 comments on commit 1979c81

Please sign in to comment.