Skip to content

Commit

Permalink
update PyClass test to no longer inject implicit python.builtin `…
Browse files Browse the repository at this point in the history
… __module__`
  • Loading branch information
t-kalinowski committed Oct 28, 2024
1 parent ff94883 commit e860480
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-python-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ test_that("Can define and instantiate empty classes", {
x <- Hi()
x$name <- "Hi"

expect_s3_class(x, "python.builtin.Hi")
expect_s3_class(x, "Hi")
expect_equal(x$name, "Hi")
})

Expand Down Expand Up @@ -205,14 +205,14 @@ test_that("self is not converted when there's a py_to_r method for it", {
}
))

assign("py_to_r.python.builtin.Base", value = function(x) {
assign("py_to_r.Base", value = function(x) {
"base"
}, envir = .GlobalEnv)

x <- Hi(2)
expect_equal(x, "base")

rm(py_to_r.python.builtin.Base, envir = .GlobalEnv)
rm(py_to_r.Base, envir = .GlobalEnv)
})

test_that("can call super from an inherited class", {
Expand Down

0 comments on commit e860480

Please sign in to comment.