-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_file.py
More file actions
47 lines (37 loc) · 903 Bytes
/
test_file.py
File metadata and controls
47 lines (37 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3
"""
Test file for Code Line Counter
Copyright (c) 2025 Mahmoud Ashraf (SNO7E)
MIT License
"""
# This is a test file to verify code counter functionality
# It contains comments, code, and blank lines
"""
This is a multi-line comment
that spans multiple lines
and should be counted correctly
"""
import sys
import os
# Define a sample function
def hello_world():
print("Hello, World!") # This is an inline comment
# This is another comment
return True
# Empty lines below
class TestClass:
'''
This is a class docstring
which is also a comment
'''
def __init__(self):
self.value = 42
def get_value(self):
# Return the value
return self.value
# Main execution
if __name__ == "__main__":
hello_world()
test = TestClass()
print(f"The value is: {test.get_value()}")
# End of file