Skip to content

Add tests for previously-uncovered paths (34% -> 66% coverage) - #6

Open
jefferis wants to merge 1 commit into
mainfrom
add-test-coverage
Open

Add tests for previously-uncovered paths (34% -> 66% coverage)#6
jefferis wants to merge 1 commit into
mainfrom
add-test-coverage

Conversation

@jefferis

Copy link
Copy Markdown
Member

Adds offline (and conditionally-gated) unit tests for paths that were previously uncovered, raising coverage from ~34% to ~66%.

What's tested

  • utils (test-utils.R): check_suggested success/error paths; py_np import + caching (numpy-gated).
  • time (test-time.R): ts2pydatetime early-return; datetime-gated UTC round-trip.
  • int64 (test-int64.R): pyids2bit64 round-trips (int64/uint64/overflow/empty/dtype error) and rids2pyint round-trips (string/file/list/numpy passthrough) — numpy-gated.
  • env (test-env.R): np_condaenv, ownpythonrequested, checkownpython, check_reticulate, simple_python_base — non-destructive.
  • convert (test-convert.R): object-column flattening + datetime normalisation; two use_arrow = TRUE round-trip tests (pandas + pyarrow + R arrow gated).

CI

test-coverage.yaml now installs pyarrow so the use_arrow = TRUE conversion path is exercised in CI.

All new tests skip gracefully when their Python module (numpy / pandas / pyarrow) or R suggest is unavailable.

Cover the simple, mostly-pure paths that had no tests:

- utils.R: check_suggested success/error; py_np import+cache
- time.R: ts2pydatetime early-return and UTC conversion
- int64.R: pyids2bit64 / rids2pyint round-trips (int64, uint64,
  overflow, empty, file/string/list marshalling)
- env.R: np_condaenv, ownpythonrequested, checkownpython, the
  non-destructive blast branch
- convert.R: object-column flattening, list-valued columns, all-NA,
  datetime->UTC POSIXct, and the use_arrow feather round-trip

Python-backed tests are gated with skip_if_no_module() /
skip_if_not_installed() so the suite still runs with no Python. The
test-coverage workflow now also installs pyarrow so the use_arrow path
runs on CI.
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.62%. Comparing base (2ef2140) to head (d399cd7).

Additional details and impacted files
@@             Coverage Diff             @@
##             main       #6       +/-   ##
===========================================
+ Coverage   34.22%   47.62%   +13.40%     
===========================================
  Files           6        6               
  Lines         485      485               
===========================================
+ Hits          166      231       +65     
+ Misses        319      254       -65     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant