Repository: NethermindEth/warp (language: python)

Issue:
Remove warp test
It is confusing for users of warp to have a test command which doesn't test their contracts but tests warp functionality


Discussion / hints:
@cicr99 @piwonskp opinion on this?
@cicr99 @piwonskp opinion on this?
I agree, npm scripts are for development. User's cli shouldn't include dev commands such as test, it affects the UX.

Fix patch:
diff --git a/.gitignore b/.gitignore
index 61bff948d..9a562b10a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -126,6 +126,9 @@ dist
 .venv/
 venv
 
+# Pyenv
+.python-version
+
 # tests
 starknet-testnet/__pycache__/*
 
diff --git a/Makefile b/Makefile
index c56d4a498..2ac7a1fd5 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ compile:
 	yarn tsc
 
 test_compilation:
-	bin/warp test --exact -f
+	yarn test:examples
 
 test_execution:
 	yarn test
diff --git a/readme.md b/readme.md
index 29503f7fb..b24148fde 100644
--- a/readme.md
+++ b/readme.md
@@ -325,7 +325,7 @@ docker-compose exec warp npx ts-node src transpile exampleContracts/ERC20.sol
 To test that your contribution doesn't break any features you can test that all previous example contracts transpile and then cairo compile by running the following:
 
 ```bash
-warp test
+yarn test:examples
 ```
 
 For this to work, you must have the cairo-lang package installed.
diff --git a/src/cli.ts b/src/cli.ts
index 354f7b91f..bd62fe0ec 100644
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -17,7 +17,6 @@ import {
 } from './starknetCli';
 import chalk from 'chalk';
 import { runVenvSetup } from './utils/setupVenv';
-import { runTests } from './testing';
 
 import { generateSolInterface } from './icf/interfaceCallForwarder';
 import { postProcessCairoFile } from './utils/postCairoWrite';
@@ -184,22 +183,6 @@ export function runTransform(file: string, options: CliOptions) {
   }
 }
 
-program
-  .command('test')
-  .description('Deprecated testing framework')
-  .option('-f --force')
-  .option('-r --results')
-  .option('-u --unsafe')
-  .option('-e --exact')
-  .action((options) =>
-    runTests(
-      options.force ?? false,
-      options.results ?? false,
-      options.unsafe ?? false,
-      options.exact ?? false,
-    ),
-  );
-
 program
   .command('analyse <file>')
   .description('Debug tool to analyse the AST')
diff --git a/src/export.ts b/src/export.ts
index 1385745c1..41c7a2cbd 100644
--- a/src/export.ts
+++ b/src/export.ts
@@ -9,7 +9,6 @@ export * from './passes/export';
 export * from './solCompile';
 export * from './solWriter';
 export * from './starknetCli';
-export * from './testing';
 export * from './transpiler';
 export * from './utils/export';
 export * from './transcode/encode';


Test patch:
diff --git a/exampleContracts/exampleContracts.test.ts b/exampleContracts/exampleContracts.test.ts
index 7bf95b1ec..49bdd7526 100644
--- a/exampleContracts/exampleContracts.test.ts
+++ b/exampleContracts/exampleContracts.test.ts
@@ -1,5 +1,5 @@
 import { describe } from 'mocha';
-import { runTests } from '../src/testing';
+import { runTests } from '../tests/testing';
 
 const TIME_LIMIT = 2 * 60 * 60 * 1000;
 
diff --git a/src/testing.ts b/tests/testing.ts
similarity index 98%
rename from src/testing.ts
rename to tests/testing.ts
index 8c440948f..a64b9d288 100644
--- a/src/testing.ts
+++ b/tests/testing.ts
@@ -1,18 +1,18 @@
 import path from 'path';
 import { CompileFailedError } from 'solc-typed-ast';
-import { findAllFiles, findCairoSourceFilePaths, findSolSourceFilePaths } from './io';
-import { compileSolFiles } from './solCompile';
-import { compileCairo } from './starknetCli';
-import { transpile } from './transpiler';
+import { findAllFiles, findCairoSourceFilePaths, findSolSourceFilePaths } from '../src/io';
+import { compileSolFiles } from '../src/solCompile';
+import { compileCairo } from '../src/starknetCli';
+import { transpile } from '../src/transpiler';
 import {
   NotSupportedYetError,
   TranspilationAbandonedError,
   WillNotSupportError,
-} from './utils/errors';
-import { groupBy, printCompileErrors } from './utils/utils';
+} from '../src/utils/errors';
+import { groupBy, printCompileErrors } from '../src/utils/utils';
 import * as fs from 'fs';
-import { outputFileSync } from './utils/fs';
-import { error } from './utils/formatting';
+import { outputFileSync } from '../src/utils/fs';
+import { error } from '../src/utils/formatting';
 
 const WARP_TEST = 'warpTest';
 const WARP_TEST_FOLDER = path.join(WARP_TEST, 'exampleContracts');