Repository: ManimCommunity/manim
Pull request: Added dry run 
I also updated README since python -m doesn't work anymore. 
I added a test for quick testing

Problem statement:
-w flag enabled by default
I just noticed an issue with the CLI arguments, and more particular concerning the `-w` (`write_to_movie`) flag. 
It appears that when `-s` (`save_last_frame`) is False (most of the time, I think), `write_to_movie `is set True even though -w hasn't been placed. (that's why for example in the `README `just` -pl` is used instead of `-plw`).

That is shown at l. 166 of `config.py`: 
`"write_to_movie": args.write_to_movie or not args.save_last_frame,`

This may cause issues when one wants to get the last frame AND the video. 

Should we fix it or let -w enabled by default (even though it's not very _rigorous_) ?

Hints from issue discussion:
Good catch. I think we want to allow for four different behaviors:
1. write to movie ONLY
2. generate last frame ONLY
3. do both
4. do neither

Right now, option 1. is the default, no arguments necessary, 2. requires `-s`, and 3. is impossible. Is 4. possible? I think this can be useful for dry runs (for example for testing purposes).

O fail to see how your suggestion allows the support for all 4 (or 3) of these? Can you please clarify?  How would each of these be invoked?
The 4 is impossible but the 3 is possible. It requires `-sw`  
So my thought was just to modify a little bit to make `-w` mandatory when wanting a video as output, like this : 

1. `-w`
2. `-s`
3. `-sw`
4. `nothing`

I will of course add a warning message saying that nothing has been selected to avoid any confusion.
Since manim is mostly used to generate video it makes sense that it would do that by default, so I'd consider it a mistake for it do nothing by default. And since the purpose of generating the last frame was to see progress quickly without waiting for video to render, it also makes sense that video is disabled when the last frame is requested.

It seems to me like the only things to do are to ensure there's an intuitive way to both create video and save the last frame and to do a dry run for testing.
How about this:

1. video only: `-w` OR nothing
2. last frame only: `-s`
3. both: `-ws`
4. neither: `-d` (for "dry run", or any other available letter)

I don't see why someone would want to render both the video and image at the same time though?
Maybe they want to use the image as a thumbnail or some such? Regardless of how it'd be used, I think this is a low-maintenance easy-to-implement feature so we might as well have it.

Also, the point is that it's really easy to support both in a single run, while doing them separately would require two different CLI calls.
I agree 

> How about this:
> 
> 1. video only: `-w` OR nothing
> 2. last frame only: `-s`
> 3. both: `-ws`
> 4. neither: `-d` (for "dry run", or any other available letter)

The first three are already implemented in the code. To me adding a new flag is a good idea. But since a few people will use a dry test maybe we could just set `--dry_test` as the flag ?  
Agreed. Let's say `--dry-run`.

Also, I thought 3. (both at the same time) wasn't possible with the current code base?
The 3 is possible with `-ws`
Ok we seem to have converged. I think we need a PR that allows number 4 and fix the original bug that opened this issue.

Now, I would *reallly* like to see this PR add tests for all of these flags... is that possible at the moment?

Commit message: added a very quick test

Patch to review:
diff --git a/README.md b/README.md
index f7124d52d3..a26816b114 100644
--- a/README.md
+++ b/README.md
@@ -193,11 +193,6 @@ For users:
 ```sh
 manim example_scenes.py SquareToCircle -pl
 ```
-1. Run the following command:
-For developers:
-```sh
-python3 manim.py example_scenes.py SquareToCircle -pl
-```
 
 ![](./readme-assets/command.png)
 
diff --git a/manim/config.py b/manim/config.py
index 1fb2e11ced..81368b6c20 100644
--- a/manim/config.py
+++ b/manim/config.py
@@ -23,67 +23,72 @@ def parse_cli():
             "-p", "--preview",
             action="store_true",
             help="Automatically open the saved file once its done",
-        ),
+        )
         parser.add_argument(
             "-w", "--write_to_movie",
             action="store_true",
             help="Render the scene as a movie file",
-        ),
+        )
         parser.add_argument(
             "-s", "--save_last_frame",
             action="store_true",
             help="Save the last frame",
-        ),
+        )
+        parser.add_argument(
+            "--dry_run", 
+            action="store_true",
+            help= "run a dry test",
+        )
         parser.add_argument(
             "-l", "--low_quality",
             action="store_true",
             help="Render at a low quality (for faster rendering)",
-        ),
+        )
         parser.add_argument(
             "-m", "--medium_quality",
             action="store_true",
             help="Render at a medium quality",
-        ),
+        )
         parser.add_argument(
             "--high_quality",
             action="store_true",
             help="Render at a high quality",
-        ),
+        )
         parser.add_argument(
             "-k", "--four_k",
             action="store_true",
             help="Render at a 4K quality",
-        ),
+        )
         parser.add_argument(
             "-g", "--save_pngs",
             action="store_true",
             help="Save each frame as a png",
-        ),
+        )
         parser.add_argument(
             "-i", "--save_as_gif",
             action="store_true",
             help="Save the video as gif",
-        ),
+        )
         parser.add_argument(
             "-f", "--show_file_in_finder",
             action="store_true",
             help="Show the output file in finder",
-        ),
+        )
         parser.add_argument(
             "-t", "--transparent",
             action="store_true",
             help="Render to a movie file with an alpha channel",
-        ),
+        )
         parser.add_argument(
             "-q", "--quiet",
             action="store_true",
             help="",
-        ),
+        )
         parser.add_argument(
             "-a", "--write_all",
             action="store_true",
             help="Write all the scenes from a file",
-        ),
+        )
         parser.add_argument(
             "-o", "--file_name",
             help="Specify the name of the output file, if"
@@ -140,8 +145,8 @@ def parse_cli():
 def get_configuration(args):
     file_writer_config = {
         # By default, write to file
-        "write_to_movie": args.write_to_movie or not args.save_last_frame,
-        "save_last_frame": args.save_last_frame,
+        "write_to_movie": (args.write_to_movie or not args.save_last_frame) and not args.dry_run,
+        "save_last_frame": args.save_last_frame and not args.dry_run,
         "save_pngs": args.save_pngs,
         "save_as_gif": args.save_as_gif,
         # If -t is passed in (for transparent), this will be RGBA
diff --git a/tests/tests_sample_scenes.py b/tests/tests_sample_scenes.py
index feca458be3..438568822a 100644
--- a/tests/tests_sample_scenes.py
+++ b/tests/tests_sample_scenes.py
@@ -2,7 +2,11 @@
 
 # This file is intended to test any new feature added. 
 # Feel free to add a test or to modify one when adding a new/changing a feature. 
-
+class Test(Scene): 
+    def construct(self): 
+        square = Square()
+        self.play(ShowCreation(square))
+    
 class Test_geometry(Scene): 
     def construct(self):
         circle = Circle()


Code review comments:
diff_hunk: @@ -23,67 +23,72 @@ def parse_cli():
             "-p", "--preview",
             action="store_true",
             help="Automatically open the saved file once its done",
-        ),
+        )
         parser.add_argument(
             "-w", "--write_to_movie",
             action="store_true",
             help="Render the scene as a movie file",
-        ),
+        )
         parser.add_argument(
             "-s", "--save_last_frame",
             action="store_true",
             help="Save the last frame",
-        ),
+        )
+        parser.add_argument(
+            "--dry_run", 
+            action="store_true",
+            help= "run a dry test",
path: manim/config.py
text: @user1:
Could yo please change "run a dry test" to "run a dry test (render scenes but generate no output files)" or some such?

@author:
Done !