Skip to content

Commit

Permalink
Rename ponytest package to conform to naming standards
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Feb 23, 2022
1 parent cd5d2b4 commit 5aa8119
Show file tree
Hide file tree
Showing 32 changed files with 55 additions and 40 deletions.
15 changes: 15 additions & 0 deletions .release-notes/ponytest-rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Rename `ponytest` package to match standard library naming conventions

We recently realized that when we renamed large portions of the standard library to conform with our naming standards, that we missed the `ponytest` package. To conform with the naming convention, the `ponytest` package as been renamed to `pony_test`.

You'll need to update your test code from:

```pony
use "ponytest"
```

to

```pony
use "pony_test"
```
2 changes: 1 addition & 1 deletion packages/buffered/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/builtin_test/_test.pony
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use @pony_get_exitcode[I32]()
use @pony_triggergc[None](ctx: Pointer[None])
use @ponyint_pagemap_get[Pointer[None]](p: Pointer[None] tag)

use "ponytest"
use "pony_test"
use "collections"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/builtin_test/_test_valtrace.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

class \nodoc\ iso _TestValtrace is UnitTest
"""
Expand Down
2 changes: 1 addition & 1 deletion packages/bureaucracy/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/collections/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "random"
use "time"

Expand Down
2 changes: 1 addition & 1 deletion packages/collections/persistent/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use mut = "collections"
use "random"
use "time"
Expand Down
2 changes: 1 addition & 1 deletion packages/encode/base64/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "collections"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/files/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "collections"
use "buffered"
use "term"
Expand Down
2 changes: 1 addition & 1 deletion packages/format/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "collections"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/ini/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/itertools/_test.pony
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use "collections"
use "ponytest"
use "pony_test"
use "time"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/json/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "collections"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/math/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "random"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/net/_test.pony
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use "files"
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for the package.
The following is a complete program with 2 trivial tests.
```pony
use "ponytest"
use "pony_test"
actor Main is TestList
new create(env: Env) =>
Expand Down Expand Up @@ -92,7 +92,7 @@ list function for each package. The following is an example that aggregates the
tests from packages `foo` and `bar`.
```pony
use "ponytest"
use "pony_test"
use bar = "bar"
use foo = "foo"
Expand Down Expand Up @@ -171,7 +171,7 @@ By default label is empty. You can set it up by overriding `label(): String`
method in unit test.
```pony
use "ponytest"
use "pony_test"
class iso _I8AddTest is UnitTest
fun name(): String => "_I8AddTest"
Expand All @@ -185,39 +185,39 @@ class iso _I8AddTest is UnitTest
### Set Up
Any kind of fixture or environment necessary for executing a [UnitTest](ponytest-UnitTest.md)
can be set up either in the tests constructor or in a function called [set_up()](ponytest-UnitTest.md#set_up).
Any kind of fixture or environment necessary for executing a [UnitTest](pony_test-UnitTest.md)
can be set up either in the tests constructor or in a function called [set_up()](pony_test-UnitTest.md#set_up).
[set_up()](ponytest-UnitTest.md#set_up) is called before the test is executed. It is partial,
[set_up()](pony_test-UnitTest.md#set_up) is called before the test is executed. It is partial,
if it errors, the test is not executed but reported as failing during set up.
The test's [TestHelper](ponytest-TestHelper.md) is handed to [set_up()](ponytest-UnitTest.md#set_up)
in order to log messages or access the tests [Env](builtin-Env.md) via [TestHelper.env](ponytest-TestHelper.md#let-env-env-val).
The test's [TestHelper](pony_test-TestHelper.md) is handed to [set_up()](pony_test-UnitTest.md#set_up)
in order to log messages or access the tests [Env](builtin-Env.md) via [TestHelper.env](pony_test-TestHelper.md#let-env-env-val).
### Tear Down
Each unit test object may define a [tear_down()](ponytest-UnitTest.md#tear_down) function. This is called after
Each unit test object may define a [tear_down()](pony_test-UnitTest.md#tear_down) function. This is called after
the test has finished to allow tearing down of any complex environment that had
to be set up for the test.
The [tear_down()](ponytest-UnitTest.md#tear_down) function is called for each test regardless of whether it
passed or failed. If a test times out [tear_down()](ponytest-UnitTest.md#tear_down) will be called after
The [tear_down()](pony_test-UnitTest.md#tear_down) function is called for each test regardless of whether it
passed or failed. If a test times out [tear_down()](pony_test-UnitTest.md#tear_down) will be called after
timed_out() returns.
When a test is in an exclusion group, the [tear_down()](ponytest-UnitTest.md#tear_down) call is considered part
When a test is in an exclusion group, the [tear_down()](pony_test-UnitTest.md#tear_down) call is considered part
of the tests run. The next test in the exclusion group will not start until
after [tear_down()](ponytest-UnitTest.md#tear_down) returns on the current test.
after [tear_down()](pony_test-UnitTest.md#tear_down) returns on the current test.
The test's [TestHelper](ponytest-TestHelper.md) is handed to [tear_down()](ponytest-UnitTest.md#tear_down) and it is permitted to log
The test's [TestHelper](pony_test-TestHelper.md) is handed to [tear_down()](pony_test-UnitTest.md#tear_down) and it is permitted to log
messages and call assert functions during tear down.
### Example
The following example creates a temporary directory in the [set_up()](ponytest-UnitTest.md#set_up) function
and removes it in the [tear_down()](ponytest-UnitTest.md#tear_down) function, thus
The following example creates a temporary directory in the [set_up()](pony_test-UnitTest.md#set_up) function
and removes it in the [tear_down()](pony_test-UnitTest.md#tear_down) function, thus
simplifying the test function itself:
```pony
use "ponytest"
use "pony_test"
use "files"
class iso TempDirTest
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/process/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "backpressure"
use "capsicum"
use "collections"
Expand Down
2 changes: 1 addition & 1 deletion packages/promises/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "time"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/random/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"
use "collections"

actor \nodoc\ Main is TestList
Expand Down
2 changes: 1 addition & 1 deletion packages/serialise/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/signals/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/stdlib/_test.pony
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ All tests can be run by compiling and running packages/stdlib.
// Include ALL standard library packages here, even if they don't have tests.
// That way stdlib can be used to type check the whole standard library,
// generate docs for it, etc.
use "ponytest"
use "pony_test"
use assert = "assert"
use backpressure= "backpressure"
use base64 = "encode/base64"
Expand Down
2 changes: 1 addition & 1 deletion packages/strings/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down
2 changes: 1 addition & 1 deletion packages/time/_test.pony
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use "ponytest"
use "pony_test"

actor \nodoc\ Main is TestList
new create(env: Env) => PonyTest(env, this)
Expand Down

0 comments on commit 5aa8119

Please sign in to comment.