Skip to main content

sml-test

Bare-bones Standard ML test runner written in Python

Assumptions

Test layout from "Programming Languages, Part A" Coursera course is used

  • A test file has *test.sml name
  • A test file has use "impl.sml"; on top
    • Where impl.sml is implementation being tested
  • A test case is a boolean variable with test* name in the test file

Example Test

Example test file hw1test.sml

use "hw1.sml";

val test1_1 = is_older ((1,2,3),(2,3,4)) = true

... where is_older is a function from hw1.sml.

Installation

pip install -U --user sml-test

The package will be installed in your user home directory. See pip documentation about user installs. You need the installation directory to be present in PATH to run sml-test from the terminal.

Usage

$ sml-test --help
Usage: sml-test [OPTIONS]

  Recursively execute all SML tests

Options:
  --version      Show the version and exit.
  -v, --verbose  Print raw SML output
  --help         Show this message and exit.

Example Test Run

$ sml-test
Running in /Users/user/git/prog_lang_a
OK=81, FAIL=1, ERR=5
week1/hw/hw1test.sml
  val test1_3 = false : bool
week0/hw/hw0test.sml
  hw0test.sml:9.14-9.20 Error: unbound variable or constructor: double
  hw0test.sml:11.14-11.20 Error: unbound variable or constructor: double
  hw0test.sml:13.14-13.20 Error: unbound variable or constructor: triple
  hw0test.sml:15.14-15.20 Error: unbound variable or constructor: triple
  hw0test.sml:17.14 Error: unbound variable or constructor: f

Requirements

Contributions & Suggestions

Please feel free to contribute a missing functionality or suggest changes, e.g.

  • Support for different tests layouts
  • Support for older Python versions
  • Support for different OS

Release files for sml-test 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sml-test 1.3.0
File Size Uploaded
sml_test-1.3.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sml-test 1.3.0
File Interpreter ABI Platform
sml_test-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / sml_test-1.3.0.tar.gz

Download URL sml_test-1.3.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9e7844b0f02ab0f71c341dec399306a200e873490e41899dcd56b2b858b0873c
BLAKE2b-256 checksum
How to use checksums
3b30335333fcb14a64563147e7d4e290473bf9e6d7dd5140c0216f4b3936946e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / sml_test-1.3.0-py3-none-any.whl

Download URL sml_test-1.3.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3038cbd082f17d0128901c91bf52ff64f00c51d5aaf2ff9b4e1b134c8039a4dc
BLAKE2b-256 checksum
How to use checksums
7066b1ca23581ea71e7abc182d0ba388e696715c52424bcae5d4ba42ec32d5f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page