Skip to content

Instantly share code, notes, and snippets.

View testing.txt
AC585fa75f9942daaaaaacaa8aadaaaaaa
00000000000000000000000000000000
@noxasaxon
noxasaxon / testing.py
Created February 27, 2021 22:40
testing parameter resolver auto run jinja
View testing.py
import timeit
# root_object = {
# "artifacts": {
# "event": {
# "details": {
# "firstname": "Sterling",
# "middlename": "Malory",
# "lastname": "Archer",
# "vault_test" : "vault:socless_vault_tests.txt"
@noxasaxon
noxasaxon / doctest.rs
Created October 18, 2021 21:11
doctest
View doctest.rs
/// ```
/// use ex01::list_of_plastic;
///
/// assert_eq!(list_of_plastic("Polyethylene Terephthalate"), Some("Polyethylene Terephthalate"));
/// assert_eq!(list_of_plastic("not a plastic"), None);
/// assert_eq!(list_of_plastic("Polyvinyl Chloride"), Some("Polyvinyl Chloride"));
/// ```
pub fn list_of_plastic(plastic: &str) -> Option<&str> {
@noxasaxon
noxasaxon / SketchSystems.spec
Created November 17, 2021 18:20
My Awesome Sketch
View SketchSystems.spec
My Awesome Sketch
First State
some event -> Second State
Second State
some event -> Third State
Third State
@noxasaxon
noxasaxon / test.rs
Created November 18, 2021 03:02
doctest-testing
View test.rs
///```rust
/// use ex00::born_to_be_alive;
/// let thread = born_to_be_alive();
/// let _ = thread.join();
///
/// ```
pub fn born_to_be_alive() -> JoinHandle<()> {
@noxasaxon
noxasaxon / as_result_test.py
Created September 6, 2022 20:14
testing result library's as_result decorator, which VsCode shows type errors even though it runs fine. The type errors go away if this code is in the actual result library repo
View as_result_test.py
from result import as_result
import requests
def test_as_result_3rd_party_fn() -> None:
"""
The ``as_result()`` is a signature-preserving decorator.
"""
request_nt = as_result(BaseException)(requests.request)