Skip to content
This repository has been archived by the owner on Jul 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #50 from RoelAdriaans/feature/add-chapter-12-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 25, 2020
2 parents e0298e4 + da9b01f commit d37bf80
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/test_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,11 @@ class Foo {
def test_class_call_function_field(self, run_code_block):
# We cannot access a field on the Class itself
lines = """
class Foo {
init() {
this.variable = 42;
}
}
print Foo.variable;
class Foo {}
Foo.variable = 42;
"""
assert (
run_code_block(lines).err
== "Only instances have properties. in line [line7]\n"
run_code_block(lines).err == "Only instances have fields. in line [line3]\n"
)
assert run_code_block(lines).out == ""

Expand Down

0 comments on commit d37bf80

Please sign in to comment.