Repository: cmpsc-481-s22-m1/PyPiCounter (language: python)

Issue:
Aug assign5
<!-- TODO: Replace the title below -->
# Augmented Assignment Statements

## Description

These changes are for implementing the augmented assignment statements counting feature.

### Type of Change

<!-- TODO: Fill in the brackets with an `x` next to all types that apply to the proposed changes -->
- [x] Feature
- [ ] Bug fix
- [ ] Documentation

## Contributors

<!-- TODO: Add your GitHub username below and the GitHub usernames of all other contributors to the proposed changes -->
- @

## Reminder

All GitHub Actions should be in a passing state before any pull request is merged.

Rename Main Package
Currently the name of our main package is src, but in order to make the program more user friendly we should change it to the name of the acutal program.

The DS_store is in a bad place in the code, we should either place it in a user-level git-ignore or project-level git-ignore


Discussion / hints:

Fix patch:
diff --git a/.github/cspell.json b/.github/cspell.json
index 5cef100..18eb19e 100644
--- a/.github/cspell.json
+++ b/.github/cspell.json
@@ -27,7 +27,8 @@
         "caldwella",
         "rachaelharris",
         "solisa",
-        "Picount"
+        "Picount",
+        "pypi"
     ],
     "ignorePaths": [
         ".github/**",
diff --git a/README.md b/README.md
index a146db1..10e9a00 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,18 @@
-# PyPiCount
+# PyPi-Counter
+
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+![example workflow](https://github.com/cmpsc-481-s22-m1/PyPiCounter/actions/workflows/main.yml/badge.svg)
+![github issues](https://img.shields.io/github/issues/cmpsc-481-s22-m1/PyPiCounter)
+
+## Table of Contents
+
+- [Overview](#overview)
+- [Project Usage](#usefulness-of-project)
+- [Getting Started](#getting-started)
+  - [Importing to Another Tool](#importing-into-another-grading-tool)
+  - [Stand-Alone Usage](#stand-alone-usage)
+- [Help and Bug Fixes](#help-and-bug-fixes)
+- [Authors](#authors)
 
 ## Overview
 
@@ -30,32 +44,100 @@ to identify in the source code (as LibCST will find all matches of this construc
 
 ## Getting Started
 
+### Importing into Another Grading Tool
+
+1. Install from PyPi by running `poetry add pypi-counter` in your terminal.
+2. Import the PyPiCounter package with the syntax: `import pypi_count`.
+3. Run the functions in the package using the `PiPyCount.[function]` syntax.
+For example, `PiPyCount.count_class_definitions(file_name)`
+
+The list of functions available are:
+
+```python
+
+count_class_definitions(file_name)                      
+# returns the number of class definitions
+
+count_comments(file_name)                                
+# returns the number of comments
+
+count_import_statements(file_name)                     
+# returns the number of import statements
+
+count_for_loops(file_name)                           
+# returns the number of for loops
+
+count_while_loops(file_name)                           
+# returns the number of while loops
+
+count_function_definitions(file_name)            
+# returns the number of function definitions  
+
+count_functions_without_docstrings(file_name)         
+# returns the number of functions without docstrings
+
+count_functions_with_docstrings(file_name)          
+# returns the number of functions with docstrings
+
+count_classes_with_docstrings(file_name)                  
+# returns the number of classes with docstrings
+
+count_classes_without_docstrings(file_name)             
+# returns the number of classes without docstrings
+
+count_function_parameters(file_name, function_name)    
+# returns the number of function parameters
+# after specifying the function name
+
+count_assignment_statements(file_name)              
+# returns the number of assignment statements
+
+count_augmented_assignment_statements(file_name)
+# returns the number of assignment statements that include
+an augmented assignment operator (+=, -=)
+
+```
+
+### Stand-Alone Usage
+
 Users can get started with this project by following the following steps:
 
-1. Clone this repository and `cd` into the project folder
-2. Run the command ```poetry install``` to install the dependencies for this project.
-3. To familiarize yourself with the arguments accepted for this project, run the
+1. Install the package with pip, using the command `pip install pypicount`
+or `pipx install pypi-counter`
+2. To familiarize yourself with the arguments accepted for this project, run the
 command ```poetry run pypicount --help```. This command displays all of the
 different arguments that can be passed. The list of the different arguments
 are listed below:
 
   ```python
-  Options:
-    --input-file PATH              [required]
-    --class_def                    [default: False]
-    --import_statements            [default: False]
-    --comment                      [default: False]
-    --function_def                 [default: False]
-    --if_statements                [default: False]
-    --function_without_docstrings  [default: False]
-    --function_with_docstrings     [default: False]
-    --class_with_docstrings        [default: False]
-    --class_without_docstrings     [default: False]
-    --install-completion           Install completion for the current shell.
-    --show-completion              Show completion for the current shell, to
-                                   copy it or customize the installation.
-
-    --help                         Show this message and exit.
+ Usage: pypicount [OPTIONS] INPUT_FILE
+
+  Main method to display the different options.
+
+Arguments:
+  INPUT_FILE  [required]
+
+Options:
+  --class-definitions             [default: False]
+  --import-statements             [default: False]
+  --comments                      [default: False]
+  --function-definitions          [default: False]
+  --if-statements                 [default: False]
+  --function-without-docstrings   [default: False]
+  --function-with-docstrings      [default: False]
+  --class-with-docstrings         [default: False]
+  --class-without-docstrings      [default: False]
+  --function-parameters TEXT
+  --assignment-statements         [default: False]
+  --augmented-assignment-statements
+                                  [default: False]
+  --while-loops                   [default: False]
+  --for-loops                     [default: False]
+  --install-completion            Install completion for the current shell.
+  --show-completion               Show completion for the current shell, to
+                                  copy it or customize the installation.
+
+  --help                          Show this message and exit.
 
   ```
 
@@ -72,13 +154,14 @@ poetry run pypicount --[argument] --input-file path/to/file
 Sample run command:
 
 ```python
-poetry run pypicount --class_with_docstrings --input-file tests/input/sample_file.py
+poetry run pypicount --class-with-docstrings --input-file tests/input/sample_file.py
 ```
 
 Sample Output:
 
 ```python
 # of functions with docstrings: 1
+```
 
 ## Help and Bug Fixes
 
diff --git a/input/sample_file.py b/input/sample_file.py
deleted file mode 100644
index 4e7a1ff..0000000
--- a/input/sample_file.py
+++ /dev/null
@@ -1,58 +0,0 @@
-"""Sample file to be analyzed for the test cases."""
-import csv  # pylint: disable=W0611
-import pytest  # pylint: disable=W0611
-
-
-class TestClass:
-    "This is a test class for the py counter."
-    age = 10
-
-    def test_greeting(self):  # pylint: disable=R0201
-        """Test greeting for the test class."""
-        print("Hello")
-
-    def test_saying(self):  # pylint: disable=R0201
-        """Test saying for the test class."""
-        print("This is a test case.")
-
-    def sample_function(self):
-        print("Where did my docstring go?")
-
-
-# Output: 10
-print(TestClass.age)
-
-# Output: <function Person.greet>
-print(TestClass.test_greeting)
-print()
-print(TestClass.test_saying)
-print()
-print(TestClass.sample_function)
-
-# Output: "This is a person class"
-print(TestClass.__doc__)
-
-class AnotherClass:
-    age_again = 10
-    def test_greeting_two(self):
-        print("Hello, how are you?")
-
-    def test_saying_two(self):
-        if age_again == 10:
-            print("What's the big idea?")
-        else:
-            print("What's up?")
-
-    def test_sample_function(self):
-        """Test sample function."""
-        print("Found my docstring!")
-
-# Output: <function Person.greet>
-print(AnotherClass.test_greeting_two)
-print()
-print(AnotherClass.test_saying_two)
-print()
-print(AnotherClass.sample_function_two)
-
-# Output: "This is a person class"
-print(AnotherClass.__doc__)
diff --git a/src/.gitkeep b/pypi_count/.gitkeep
similarity index 100%
rename from src/.gitkeep
rename to pypi_count/.gitkeep
diff --git a/src/__init__.py b/pypi_count/__init__.py
similarity index 100%
rename from src/__init__.py
rename to pypi_count/__init__.py
diff --git a/pypi_count/command_line_interface.py b/pypi_count/command_line_interface.py
new file mode 100644
index 0000000..cefac6b
--- /dev/null
+++ b/pypi_count/command_line_interface.py
@@ -0,0 +1,92 @@
+#!/usr/bin/env python -W ignore::DeprecationWarning
+
+"""The command line interface for the PyCount program."""
+from pathlib import Path
+from rich.console import Console
+
+import typer
+
+from pypi_count.py_counter import PyPiCount
+
+cli = typer.Typer()
+
+console = Console()
+
+
+@cli.command()
+def main(  # pylint: disable=R0913,R0912,R0914
+    input_file: Path,
+    class_def: bool = typer.Option(False, "--class-definitions"),
+    import_statements: bool = typer.Option(False, "--import-statements"),
+    comment: bool = typer.Option(False, "--comments"),
+    function_def: bool = typer.Option(False, "--function-definitions"),
+    if_statements: bool = typer.Option(False, "--if-statements"),
+    function_without_docstrings: bool = typer.Option(False, "--function-without-docstrings"),
+    function_with_docstrings: bool = typer.Option(False, "--function-with-docstrings"),
+    class_with_docstrings: bool = typer.Option(False, "--class-with-docstrings"),
+    class_without_docstrings: bool = typer.Option(False, "--class-without-docstrings"),
+    function_parameters: str = typer.Option(None),
+    assignment_statements: bool = typer.Option(False, "--assignment-statements"),
+    augmented_assignment_statements: bool = typer.Option(False,"--augmented-assignment-statements"),
+    while_loops: bool = typer.Option(False, "--while-loops"),
+    for_loops: bool = typer.Option(False, "--for-loops"),
+
+):
+    """Main method to display the different options."""
+    if input_file.is_file():
+        pycount = PyPiCount(input_file)
+
+        if class_def:
+            console.print("\n# of class definitions: " + str(pycount.count_class_definitions()))
+
+        if import_statements:
+            console.print("\n# of import statements: " + str(pycount.count_import_statements()))
+
+        if comment:
+            console.print("\n# of comments: " + str(pycount.count_comments()))
+
+        if function_def:
+            console.print("\n# of function definitions: " + \
+            str(pycount.count_function_definitions()))
+
+        if function_without_docstrings:
+            console.print("\n# of functions w/o docstrings: " + \
+            str(pycount.count_functions_without_docstrings()))
+
+        if function_with_docstrings:
+            console.print("\n# of functions with docstrings: " + \
+            str(pycount.count_functions_with_docstrings()))
+
+        if class_without_docstrings:
+            console.print("\n# of classes w/o docstrings: " + \
+            str(pycount.count_classes_without_docstrings()))
+
+        if class_with_docstrings:
+            console.print("\n# of classes with docstrings: " + \
+            str(pycount.count_classes_with_docstrings()))
+
+        if if_statements:
+            console.print("\n# of if statements: " + \
+            str(pycount.count_if_statements()))
+
+        if function_parameters:
+            console.print("\n# of parameters in functions: " + \
+            str(pycount.count_function_parameters(function_parameters)))
+
+        if assignment_statements:
+            console.print("\n of assignment statements: " + \
+            str(pycount.count_assignment_statements()))
+
+        if augmented_assignment_statements:
+            console.print("\n of augmented assignment" + "statements: " + \
+            str(pycount.count_augmented_assignment_statements()))
+
+        if while_loops:
+            console.print("\n of while loop statements: " + \
+            str(pycount.count_while_loops()))
+
+        if for_loops:
+            console.print("\n of for loop statements: " + \
+            str(pycount.count_for_loops()))
+    else:
+        console.print("Please input a valid file!")
diff --git a/src/py_counter.py b/pypi_count/py_counter.py
similarity index 62%
rename from src/py_counter.py
rename to pypi_count/py_counter.py
index d305a58..ca2836d 100644
--- a/src/py_counter.py
+++ b/pypi_count/py_counter.py
@@ -4,13 +4,13 @@
 import libcst as cst
 
 
-class PyCount:
+class PyPiCount:
     """Class for the python counter."""
 
     def __init__(self, filename):
         """Declaring the self variable."""
-        with open(filename, 'r') as file: # pylint: disable=W1514
-            self.search = cst.parse_module(file.read())  # pylint: disable=R1732,W1514
+        with open(filename, 'r', encoding="utf8") as file:
+            self.search = cst.parse_module(file.read())
 
     def count_class_definitions(self):
         """Counting the class definitions."""
@@ -31,6 +31,13 @@ def count_if_statements(self):
         """Counting the if statements."""
         return len(m.findall(self.search, m.If()))
 
+    def count_while_loops(self):
+        """Counting the while loops."""
+        return len(m.findall(self.search, m.While()))
+
+    def count_for_loops(self):
+        """Counting the for loops."""
+        return len(m.findall(self.search, m.For()))
 
     def count_function_definitions(self):
         """Counting the function definitions."""
@@ -38,7 +45,7 @@ def count_function_definitions(self):
         return len(func_definitions)
 
 
-    def count_functions_without_docstring(self):  # pylint: disable=R1710
+    def count_functions_without_docstrings(self):  # pylint: disable=R1710
         """Counting the function definitions without docstrings."""
         functions_list = m.findall(self.search, m.FunctionDef())
         count = 0
@@ -50,7 +57,7 @@ def count_functions_without_docstring(self):  # pylint: disable=R1710
         return count
 
 
-    def count_functions_with_docstring(self):  # pylint: disable=R1710
+    def count_functions_with_docstrings(self):  # pylint: disable=R1710
         """Counting the function definitions with docstrings."""
         function_definitions2 = m.findall(self.search, m.FunctionDef())
         count = 0
@@ -61,7 +68,7 @@ def count_functions_with_docstring(self):  # pylint: disable=R1710
                 total.append(count)
         return count
 
-    def count_classes_without_docstring(self):  # pylint: disable=R1710
+    def count_classes_without_docstrings(self):  # pylint: disable=R1710
         """Counting the class definitions without docstrings."""
         class_definitions = m.findall(self.search, m.ClassDef())
         count = 0
@@ -73,7 +80,7 @@ def count_classes_without_docstring(self):  # pylint: disable=R1710
         return count
 
 
-    def count_classes_with_docstring(self):  # pylint: disable=R1710
+    def count_classes_with_docstrings(self):  # pylint: disable=R1710
         """Counting the class definitions without docstrings."""
         class_definitions2 = m.findall(self.search, m.ClassDef())
         count = 0
@@ -83,3 +90,22 @@ def count_classes_with_docstring(self):  # pylint: disable=R1710
                 total.append(count)
                 count += 1
         return count
+
+    def count_function_parameters(self, function_name):
+        """Counting the parameters within a function."""
+        functions = m.findall(self.search, m.FunctionDef())
+        param_result = 0
+        for func in functions:
+            if func.name.value == function_name:
+                param_result = len(func.params.params)
+        return param_result
+
+    def count_assignment_statements(self):
+        """Counting the assignment statement."""
+        assignment_statement = m.findall(self.search, m.Assign())
+        return len(assignment_statement)
+
+    def count_augmented_assignment_statements(self):
+        """Counting the augmented assignment statement."""
+        aug_assignment_statement = m.findall(self.search, m.AugAssign())
+        return len(aug_assignment_statement)
diff --git a/pyproject.toml b/pyproject.toml
index e57555f..442366e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,16 +1,21 @@
 [tool.poetry]
-name = "PyPiCount"
-version = "0.1.0"
-description = "A counting program used for different Pythong packages and modules."
+name = "PyPi-Counter"
+version = "0.2.0"
+description = "A counting program used for different Python packages and modules."
 authors = ["Adriana Solis <solisa@allegheny.edu>, Alexis Caldwell <caldwella2@allegheny.edu>, Rachael Harris <harrisr@allegheny.edu>, Ramon Guzman <guzmanr@allegheny.edu>, Ryan Hilty <hiltyr@allegheny.edu>"]
 license = "MIT"
+readme = "README.md"
+homepage = "https://github.com/cmpsc-481-s22-m1/PyPiCounter/tree/main"
+repository = "https://github.com/cmpsc-481-s22-m1/PyPiCounter/tree/main"
+include = [
+    "LICENSE",
+]
 packages = [
-    { include = "py_counter.py", from="src" },
-    { include = "src/py_counter.py"},
+    { include = "pypi_count" },
 ]
 
 [tool.poetry.scripts]
-pypicount = "src.command_line_interface:cli"
+pypicount = "pypi_count.command_line_interface:cli"
 
 [tool.poetry.dependencies]
 python = ">=3.7,<4.0"
@@ -26,8 +31,8 @@ pylint = "^2.12.2"
 black = "^21.12b0"
 
 [tool.taskipy.tasks]
-test = "pytest --cov-report term-missing --cov-fail-under=70  --cov-branch --cov=src tests/"
-lint = "pylint tests/ src/"
+test = "pytest --cov-report term-missing --cov-fail-under=70  --cov-branch --cov=pypi_count tests/"
+lint = "pylint tests/ pypi_count/"
 
 [build-system]
 requires = ["poetry-core>=1.0.0"]
diff --git a/setup.py b/setup.py
deleted file mode 100644
index d6d4700..0000000
--- a/setup.py
+++ /dev/null
@@ -1,26 +0,0 @@
-import os
-from setuptools import setup
-
-# Utility function to read the README file.
-
-def read(fname):
-    return open(os.path.join(os.path.dirname(__file__), fname)).read()
-
-setup(
-    name = "PyPiCount", # this is the name of the package
-    version = "0.1.0", # the initial release version
-    author = "Adriana Solis, Alexis Caldwell, Rachael Harris, Ramon Guzman, Ryan Hilty", # author names
-    author_email = "solisa@allegheny.edu, caldwella2@allegheny.edu, harrisr@allegheny.edu, guzmanr@allegheny.edu, hiltyr@allegheny.edu",
-    description = ("A python program to count the number of instances of different specifications."),
-    license = "MIT",
-    keywords = "python counter",
-    url = "https://github.com/cmpsc-481-s22-m1/PyCount",
-    packages=['PyCount', 'tests'],
-    long_description=read('README'),
-    classifiers=[
-        "Development Status :: 3 - Alpha",
-        "Topic :: Education :: Testing",
-        "Environment :: Console",
-        "License :: OSI Approved :: MIT License",
-    ],
-)
diff --git a/src/command_line_interface.py b/src/command_line_interface.py
deleted file mode 100644
index afa2661..0000000
--- a/src/command_line_interface.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env python -W ignore::DeprecationWarning
-
-"""The command line interface for the PyCount program."""
-from pathlib import Path
-from rich.console import Console
-
-import typer
-
-from src.py_counter import PyCount
-
-cli = typer.Typer()
-
-console = Console()
-
-
-@cli.command()
-def main(  # pylint: disable=R0913
-    input_file: Path = typer.Option(...),
-    class_def: bool = typer.Option(False, "--class_def"),
-    import_statements: bool = typer.Option(False, "--import_statements"),
-    comment: bool = typer.Option(False, "--comment"),
-    function_def: bool = typer.Option(False, "--function_def"),
-    if_statements: bool = typer.Option(False, "--if_statements"),
-    function_without_docstrings: bool = typer.Option(False, "--function_without_docstrings"),
-    function_with_docstrings: bool = typer.Option(False, "--function_with_docstrings"),
-    class_with_docstrings: bool = typer.Option(False, "--class_with_docstrings"),
-    class_without_docstrings: bool = typer.Option(False, "--class_without_docstrings"),
-):
-    """Main method to display the different options."""
-    pycount = PyCount(input_file)
-    if class_def:
-        console.print("\n# of class definitions: " + str(pycount.count_class_definitions()))
-
-    if import_statements:
-        console.print("\n# of import statements: " + str(pycount.count_import_statements()))
-
-    if comment:
-        console.print("\n# of comments: " + str(pycount.count_comments()))
-
-    if function_def:
-        console.print("\n# of function definitions: " + str(pycount.count_function_definitions()))
-
-    if function_without_docstrings:
-        console.print("\n# of functions w/o docstrings: " + str(pycount.count_functions_without_docstring())) # pylint: disable=C0301
-
-    if function_with_docstrings:
-        console.print("\n# of functions with docstrings: " + str(pycount.count_functions_with_docstring())) # pylint: disable=C0301
-
-    if class_without_docstrings:
-        console.print("\n# of classes w/o docstrings: " + str(pycount.count_classes_without_docstring())) # pylint: disable=C0301
-
-    if class_with_docstrings:
-        console.print("\n# of functions with docstrings: " + str(pycount.count_classes_with_docstring())) # pylint: disable=C0301
-
-    if if_statements:
-        console.print("\n# of if statements: " + str(pycount.count_if_statements())) # pylint: disable=C0301


Test patch:
diff --git a/tests/input/sample_file.py b/tests/input/sample_file.py
index 916cac6..235d0be 100644
--- a/tests/input/sample_file.py
+++ b/tests/input/sample_file.py
@@ -5,7 +5,14 @@
 
 class TestClass:
     "This is a test class for the py counter."
-    age = 10
+    real_age = 10
+    x = 2
+    x +=4
+
+    def __init__(self, name, age):
+        "Init function that defines the parameters."
+        self.name = name
+        self.age = age
 
     def test_greeting(self):  # pylint: disable=R0201
         """Test greeting for the test class."""
@@ -18,9 +25,8 @@ def test_saying(self):  # pylint: disable=R0201
     def sample_function(self): # pylint: disable=C0116,R0201
         print("Where did my docstring go?")
 
-
 # Output: 10
-print(TestClass.age)
+print(TestClass.real_age)
 
 # Output: <function Person.greet>
 print(TestClass.test_greeting)
@@ -28,11 +34,21 @@ def sample_function(self): # pylint: disable=C0116,R0201
 print(TestClass.test_saying)
 print()
 print(TestClass.sample_function)
+testing = TestClass(10, "Lily")
+print()
+print(f"A sample age: {testing.age}")
+print(f"A sample name: {testing.name}")
 
 # Output: "This is a person class"
 print(TestClass.__doc__)
 
+
 class AnotherClass: # pylint: disable=C0115
+    def __init__(self, name, age, bio):
+        self.name = name
+        self.age = age
+        self.bio = bio
+
     def test_greeting_two(self): # pylint: disable=C0116,R0201
         print("Hello, how are you?")
 
@@ -47,12 +63,25 @@ def test_sample_function(self): # pylint: disable=C0116,R0201
         """Test sample function."""
         print("Found my docstring!")
 
+    def test_sample_for(self): # pylint: disable=C0116,R0201
+        fruits = ["apple", "banana", "cherry"] # Sample for loop
+        for x in fruits:    # pylint: disable=R0201,C0103
+            if x == "banana":
+                break
+            print(x)
+
 # Output: <function Person.greet>
 print(AnotherClass.test_greeting_two)
 print()
 print(AnotherClass.test_saying_two)
 print()
 print(AnotherClass.test_sample_function)
+test_two = AnotherClass("PyPiCounter v0.2.0", 1, \
+                        "I am a counting tool for Python packages or modules.")
+print()
+print(f"I am {test_two.name}.")
+print(f"I am currently in the {test_two.age}st phase of my software development.")
+print(f"{test_two.bio}")
 
 # Output: "This is a person class"
 print(AnotherClass.__doc__)
diff --git a/tests/test_command_line_interface.py b/tests/test_command_line_interface.py
index ca2b716..fce50c2 100644
--- a/tests/test_command_line_interface.py
+++ b/tests/test_command_line_interface.py
@@ -1,68 +1,104 @@
 """Test cases for the command line interface."""
 from typer.testing import CliRunner
 
-from command_line_interface import cli
-
+from pypi_count.command_line_interface import cli
 
 cli_runner = CliRunner()
 
 
 def test_main_class():
     """Test case to see if class argument is correct."""
-    class_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--class_def"]) # pylint: disable=C0301
+    class_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", "--class-definitions"])
     assert class_result.exit_code == 0
-    assert "2" in class_result.stdout
+    assert "class definitions" in class_result.stdout
+
+def test_while_loops():
+    """Test case to see if class argument is correct."""
+    while_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", "--while-loops"])
+    assert while_result.exit_code == 0
+    assert "while loop" in while_result.stdout
 
+def test_for_loops():
+    """Test case to see if class argument is correct."""
+    for_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", "--for-loops"])
+    assert for_result.exit_code == 0
+    assert "for loop" in for_result.stdout
 
 def test_main_imports():
     """Test case to see if import argument is correct."""
-    import_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--import_statements"]) # pylint: disable=C0301
+    import_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", "--import-statements"])
     assert import_result.exit_code == 0
-    assert "2" in import_result.stdout
+    assert "import statements" in import_result.stdout
 
 
 def test_main_comment():
     """Test case to see if comment argument is correct."""
-    comment_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--comment"]) # pylint: disable=C0301
+    comment_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", "--comments"])
     assert comment_result.exit_code == 0
-    assert "14" in comment_result.stdout
+    assert "comments" in comment_result.stdout
 
 
 def test_main_function_def():
     """Test case to see if function definition argument is correct."""
-    function_def_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--function_def"]) # pylint: disable=C0301
+    function_def_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                                  "--function-definitions"])
     assert function_def_result.exit_code == 0
-    assert "6" in function_def_result.stdout
+    assert "function definitions" in function_def_result.stdout
 
 
 def test_main_function_without_docstrings():
     """Test case to see if function without docstrings argument is correct."""
-    func_wo_docstr_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--function_without_docstrings"]) # pylint: disable=C0301
+    func_wo_docstr_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                                    "--function-without-docstrings"])
     assert func_wo_docstr_result.exit_code == 0
-    assert "3" in func_wo_docstr_result.stdout
+    assert "functions w/o docstrings" in func_wo_docstr_result.stdout
 
 
 def test_main_function_with_docstrings():
     """Test case to see if function without docstrings argument is correct."""
-    func_w_docstr_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--function_with_docstrings"]) # pylint: disable=C0301
+    func_w_docstr_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                                   "--function-with-docstrings"])
     assert func_w_docstr_result.exit_code == 0
-    assert "3" in func_w_docstr_result.stdout
+    assert "functions with docstrings" in func_w_docstr_result.stdout
 
 
 def test_main_class_without_docstrings():
     """Test case to see if class without docstrings argument is correct."""
-    class_wo_docstr_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--class_without_docstrings"]) # pylint: disable=C0301
+    class_wo_docstr_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                                     "--class-without-docstrings"])
     assert class_wo_docstr_result.exit_code == 0
-    assert "1" in class_wo_docstr_result.stdout
+    assert "classes w/o docstrings" in class_wo_docstr_result.stdout
 
 def test_main_class_with_docstrings():
     """Test case to see if class with docstrings argument is correct."""
-    class_w_docstr_result = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--class_with_docstrings"]) # pylint: disable=C0301
+    class_w_docstr_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                                    "--class-with-docstrings"])
     assert class_w_docstr_result.exit_code == 0
-    assert "1" in class_w_docstr_result.stdout
+    assert "classes with docstrings" in class_w_docstr_result.stdout
 
 def test_if_statements():
     """Test case to see if 'if statements' argument is correct."""
-    if_state = cli_runner.invoke(cli, ["--input-file", "tests/input/sample_file.py", "--if_statements"]) # pylint: disable=C0301
+    if_state = cli_runner.invoke(cli, ["tests/input/sample_file.py", "--if-statements"])
     assert if_state.exit_code == 0
-    assert "1" in if_state.stdout
+    assert "if statements" in if_state.stdout
+
+def test_function_parameters():
+    """Test case to see if function finds the parameters."""
+    function_parameter_result = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                                    "--function-parameters", "test_saying_two"])
+    assert function_parameter_result.exit_code == 0
+    assert "parameters in functions" in function_parameter_result.stdout
+
+def test_count_assignment_statements():
+    """Test case to see if 'assignment statements' argument is correct."""
+    assign_state = cli_runner.invoke(cli, ["tests/input/sample_file.py", \
+                                       "--assignment-statements"])
+    assert assign_state.exit_code == 0
+    assert "assignment statements" in assign_state.stdout
+
+def testing_valid_file():
+    """Test case for a non-valid file exception."""
+    nonvalid_file = cli_runner.invoke(cli, ["test/input/text.txt", \
+                                            "--class-definitions"])
+    assert nonvalid_file.exit_code == 0
+    assert "Please input a valid file!" in nonvalid_file.stdout
diff --git a/tests/test_py_counter.py b/tests/test_py_counter.py
index 9a35116..3074be7 100644
--- a/tests/test_py_counter.py
+++ b/tests/test_py_counter.py
@@ -1,50 +1,72 @@
 """Test cases for py_counter method."""
 
-from src.py_counter import PyCount
+from pypi_count.py_counter import PyPiCount
 
 
 FILE = "tests/input/sample_file.py"
-test_pycount = PyCount(FILE)
+test_pycount = PyPiCount(FILE)
 
 def test_count_class_defintions():
     """Test case for counting the class definitions."""
     expected_class = 2
     assert test_pycount.count_class_definitions() == expected_class
 
-
 def test_count_comments():
     """Test case for counting the class definitions."""
-    expected_comments = 14
+    expected_comments = 17
     assert test_pycount.count_comments() == expected_comments
 
+def test_count_while_loops():
+    """Test case for counting the while loops."""
+    expected_while = 0
+    assert test_pycount.count_while_loops() == expected_while
 
 def test_import_statements():
-    """Test case for counting the import statements."""
+    """Test case for counting import statements."""
     expected_imports = 2
     assert test_pycount.count_import_statements() == expected_imports
 
+def test_count_for_loops():
+    """Test case for counting the for loops."""
+    expected_for = 1
+    assert test_pycount.count_for_loops() == expected_for
 
 def test_count_if_statements():
     """Test case for counting the if statements."""
-    expected_if = 1
+    expected_if = 2
     assert test_pycount.count_if_statements() == expected_if
 
 def test_count_functions_without_docstrings():
     """Test case for counting the number of functions that do not have docstrings."""
-    expected_function_dst = 3
-    assert test_pycount.count_functions_without_docstring() == expected_function_dst
+    expected_function_dst = 5
+    assert test_pycount.count_functions_without_docstrings() == expected_function_dst
 
 def test_count_functions_with_docstrings():
     """Test case for counting the number of functions that do not have docstrings."""
-    expected_function_dst_2 = 3
-    assert test_pycount.count_functions_with_docstring() == expected_function_dst_2
+    expected_function_dst_2 = 4
+    assert test_pycount.count_functions_with_docstrings() == expected_function_dst_2
 
 def test_count_classes_without_docstrings():
     """Test case for counting the number of Classes that do not have docstrings."""
     expected_classes_dst = 1
-    assert test_pycount.count_classes_without_docstring() == expected_classes_dst
+    assert test_pycount.count_classes_without_docstrings() == expected_classes_dst
 
 def test_count_classes_with_docstrings():
     """Test case for counting the number of Classes that do not have docstrings."""
     expected_classes_dst_2 = 1
-    assert test_pycount.count_classes_with_docstring() == expected_classes_dst_2
+    assert test_pycount.count_classes_with_docstrings() == expected_classes_dst_2
+
+def test_function_parameters():
+    """Test case for counting the parameters"""
+    expected_parameters = 1
+    assert test_pycount.count_function_parameters("test_saying_two") == expected_parameters
+
+def test_count_assignment_statements(): #pylint: disable=C0116
+    """Test case for counting assignment statements"""
+    expected_assignment_statements = 11
+    assert test_pycount.count_assignment_statements() == expected_assignment_statements
+
+def test_count_augmented_assignment_statements():
+    """Test case for counting augmented assignement statements."""
+    exp_aug_assignment_statements = 1
+    assert test_pycount.count_augmented_assignment_statements() == exp_aug_assignment_statements