• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vEnhance / otis-web / 19577630329
94%

Build:
DEFAULT BRANCH: main
Ran 21 Nov 2025 04:59PM UTC
Jobs 1
Files 36
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Nov 2025 04:57PM UTC coverage: 57.12% (-35.0%) from 92.087%
19577630329

push

github

web-flow
fix: actually fix roster test omfg (#436)

* fix: eliminate flakiness in test_inquiry with parallel execution

The test_inquiry test was failing intermittently when run with pytest -n auto
due to random subject assignment in UnitFactory. When units[19] (the 7th unit
Alice tries to unlock) randomly got subject="K" (Secret), it would be auto-
processed by the view logic at roster/views.py:351-352, even though the test
expected it to NOT be auto-processed.

The view auto-processes secret units (subject "K") regardless of the student's
unlock count, which caused the test assertion to fail approximately 12.5% of
the time (1 in 8 possible subjects).

Fixed by explicitly creating units with non-secret subjects (A, C, G, N, F)
instead of relying on random factory generation. The test later creates an
explicit secret unit when testing that functionality.

* fix: avoid IntegrityError from unique_together constraint in test_inquiry

The previous fix introduced a new IntegrityError due to Unit's unique_together
constraint on (group, code). By creating only 5 UnitGroup objects and reusing
them for 20 Units, we hit a birthday paradox problem:

- Unit.code is randomly generated: choice("BDZ") + subject + choice("WXY")
- This gives only 9 possible codes per group (3 × 1 × 3)
- With 4 units per group (20 units ÷ 5 groups), probability of collision ≈ 54%

The fix: Create 20 separate UnitGroup objects (one per unit) to avoid any
possibility of code collision within a group. We still cycle through non-secret
subjects (A, C, G, N, F) to prevent the original flaky test issue where
subject="K" (Secret) would trigger auto-processing.

* style: apply ruff formatting to test_inquiry

---------

Co-authored-by: Claude <noreply@anthropic.com>

8 of 216 branches covered (3.7%)

Branch coverage included in aggregate %.

1079 of 1687 relevant lines covered (63.96%)

0.64 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.0
-4.0% suggestions/models.py
2
71.43
-28.57% conftest.py
7
78.16
-11.49% payments/models.py
10
76.47
-9.24% core/models.py
10
73.27
-11.88% rpg/models.py
12
65.25
-12.06% otisweb/settings.py
13
75.61
-15.85% hanabi/models.py
14
78.64
-13.59% dashboard/models.py
19
55.42
-33.73% arch/models.py
22
60.91
-26.36% exams/models.py
30
70.49
-29.51% opal/models.py
34
53.85
-34.62% markets/models.py
54
14.58
-73.96% exams/calculator.py
57
15.38
-73.08% wikihaxx/mdx/otis.py
65
21.49
-75.21% evans_django_tools/handler.py
117
45.28
-43.4% roster/models.py
Jobs
ID Job ID Ran Files Coverage
1 19577630329.1 21 Nov 2025 04:59PM UTC 36
57.12
GitHub Action Run
Source Files on build 19577630329
  • Tree
  • List 36
  • Changed 16
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • cf1375a3 on github
  • Prev Build on main (#19575999169)
  • Next Build on main (#19577654661)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc