1library(pystr)
2context("pystr_isalpha")
3
4test_that("it returns true when all characters are alphabetic", {
5  expect_true(pystr_isalpha("abc"))
6})
7
8test_that("it returns false when not all characters are alphabetic", {
9  expect_false(pystr_isalpha("abc!"))
10})
11
12test_that("it works with a vector of strings", {
13  expect_equal(pystr_isalpha(c("one", "2", "three!")), c(TRUE, FALSE, FALSE))
14})
15
16test_that("it works with NAs", {
17  expect_equal(pystr_isalpha(c("one", "2", NA)), c(TRUE, FALSE, NA))
18})
19