magick_message=l=>l?'abracadabra!':'codewarz'
export const magick_message=(l:boolean)=>l?'abracadabra!':'codewarz'- magick_message=l=>l?'abracadabra!':'codewarz'
const Test = require('@codewars/test-compat'); describe('Example', function() { it('test case', function() { Test.assertEquals(magick_message(true), 'abracadabra!') Test.assertEquals(magick_message(false), 'codewarz') }); });
import chai, { assert } from "chai";import { magick_message } from "./solution"chai.config.truncateThreshold = 0;- const Test = require('@codewars/test-compat');
describe("Example", function() {it("test case", function() {assert.equal(magick_message(true), 'abracadabra!')assert.equal(magick_message(false), 'codewarz')});- describe('Example', function() {
- it('test case', function() {
- Test.assertEquals(magick_message(true), 'abracadabra!')
- Test.assertEquals(magick_message(false), 'codewarz')
- });
- });
export const magick_message=(l:boolean)=>l?'abracadabra!':'codewarz'
exec(f"{[].__doc__[26]}{dict.__doc__[15] }{type(1.0).__name__[3]}{globals.__name__[0]}{type(1).__name__[0]}{str(print.__module__.__class__)[1]}{().__class__.__subclasses__()[2].__name__[13]}_{dict.__doc__[15] }{type({None}).__name__[1]}{str.__name__[0]}{str.__name__[0]}{type(1.0).__name__[3]}{globals.__name__[0]}{type({None}).__name__[1]}={type(1.0).__name__[1]}{type(1.0).__name__[3]}{dict.__doc__[15] }{type(True).__name__[0]}{ZeroDivisionError.__doc__[21]}{type(1.0).__name__[3]} {type(1).__name__[0]}:{type(1).__name__[0]}*'{type(1.0).__name__[3]}{type(True).__name__[0]}{().__class__.__bases__[0].__subclasses__()[40].__name__[-1]}{type(1.0).__name__[3]}{str(print.__module__.__class__)[1]}{type(1.0).__name__[3]}{ZeroDivisionError.__doc__[21]}{type(1.0).__name__[3]}{type(True).__name__[0]}{().__class__.__bases__[0].__subclasses__()[40].__name__[-1]}{type(1.0).__name__[3]}!'{type(1.0).__name__[2]}{().__class__.__bases__[0].__subclasses__()[40].__name__[-1]}'{str(print.__module__.__class__)[1]}{type(1.0).__name__[2]}{ZeroDivisionError.__doc__[21]}{type({None}).__name__[1]}{chr(119)}{type(1.0).__name__[3]}{().__class__.__bases__[0].__subclasses__()[40].__name__[-1]}{list(zip(enumerate(str.__dict__)))[63][0][1][0]}'{[].__doc__[26]}")- export const magick_message=(l:boolean)=>l?'abracadabra!':'codewarz'
import chai, { assert } from "chai"; import { magick_message } from "./solution" chai.config.truncateThreshold = 0; describe("Example", function() { it("test case", function() { assert.equal(magick_message(true), 'abracadabra!') assert.equal(magick_message(false), 'codewarz') }); });
import codewars_test as testfrom solution import magick_message- import chai, { assert } from "chai";
- import { magick_message } from "./solution"
- chai.config.truncateThreshold = 0;
@test.describe("Example")def test_group():@test.it("test case")def test_case():test.assert_equals(magick_message(True), 'abracadabra!')test.assert_equals(magick_message(False), 'codewarz')- describe("Example", function() {
- it("test case", function() {
- assert.equal(magick_message(true), 'abracadabra!')
- assert.equal(magick_message(false), 'codewarz')
- });
- });
#magick_message=lambda i:i and'abracadabra!'or'codewarz' magick_message =lambda i:['codewarz','abracadabra!'][i] # ^ # golfed except this space
magick_message=lambda i:'abracadabra!'if i else'codewarz'- #magick_message=lambda i:i and'abracadabra!'or'codewarz'
- magick_message =lambda i:['codewarz','abracadabra!'][i]
- # ^
- # golfed except this space
import codewars_test as test from solution import reverse_word # test.assert_equals(actual, expected, [optional] message) @test.describe("Main") def test_group(): @test.it("test case") def test_case(): test.assert_equals(reverse_word('olleh'), 'hello') test.assert_equals(reverse_word('ih'), 'hi') test.assert_equals(reverse_word('ecnaidar'), 'radiance')
- import codewars_test as test
# TODO Write testsimport solution # or from solution import example- from solution import reverse_word
- # test.assert_equals(actual, expected, [optional] message)
@test.describe("Example")- @test.describe("Main")
- def test_group():
- @test.it("test case")
- def test_case():
test.assert_equals(1 + 1, 2)- test.assert_equals(reverse_word('olleh'), 'hello')
- test.assert_equals(reverse_word('ih'), 'hi')
- test.assert_equals(reverse_word('ecnaidar'), 'radiance')