Skip to content

Commit 4735c5d

Browse files
committed
Library documented
1 parent 685d84c commit 4735c5d

6 files changed

Lines changed: 96 additions & 13 deletions

File tree

‎Generated/Data.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[28, 568, 274, 522, 500]
2+
[14, 284, 137, 261, 250]
File renamed without changes.

‎Readme.md‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,3 +518,97 @@ multy_dict = {
518518
Output: {22: {296: 'dolor', 'qwertyuytr': 298, 75: 'standard', 'words': 'p'},
519519
'Ors': ['PowerUp', 'Finibus', 'injected', 'fugiat', 'therefore']}
520520
```
521+
522+
523+
### Gt_set
524+
525+
This generator return a random set, it has a similar behavior that the others,
526+
some examples below:
527+
528+
*Params: gt_set( number ), per default it is 1*
529+
530+
```
531+
> print( Pelt.gt_set(5) )
532+
533+
Output: {136, 200, 'Cors-c', 277, 120}
534+
535+
def joiner(value):
536+
537+
example = {"example",1,2}
538+
return value.union(example)
539+
540+
print( joiner(Pelt.gt_set(4)) )
541+
542+
Output: {1, 2, 'ghorlayck', 'example', 201, 283, 'injected'}
543+
```
544+
545+
546+
## Snap
547+
548+
After learning the functionality of the generators, surely you would have liked that
549+
said test data could have it in a separate flow to test and to better predict the result of your algorithms.
550+
Now we are going to unleash all the power that Pelt can offer, with the snap functions we can archive test data
551+
and test it later with a much more predictable result, allowing you to use the tests in a more efficient way.
552+
553+
**NOTE: SNAPS ONLY RECEIVE A GENERATORS**
554+
555+
### Span_take
556+
557+
This function creates a file with the generated data that you passed to the function, you must pass it the
558+
name you want for your file, if you passed it the name of an existing file it will overwrite the data.
559+
560+
*Params: Pelt.snap_take( "file name", ( Generators, Generators, ... ) ) => Require a matrix*
561+
562+
```
563+
Pelt.snap_take("Data", (
564+
Pelt.gt_int(5), Pelt.gt_str(4)
565+
))
566+
```
567+
568+
569+
![Pelt Snap_take](screenshots/snaps.PNG)
570+
571+
572+
```
573+
def duplicate(numbers):
574+
return list(map( lambda x: x *2, numbers))
575+
576+
577+
data = Pelt.gt_int(5)
578+
579+
Pelt.snap_take("Data",(
580+
duplicate(data), data
581+
))
582+
```
583+
584+
585+
![Pelt Snap_take](screenshots/take.PNG)
586+
587+
588+
### Span_rm
589+
590+
This function creates a file with the generated data that you passed to the function, you must pass it the
591+
name you want for your file, if you passed it the name of an existing file it will overwrite the data.
592+
593+
*Params: Pelt.snap_rm( "file name" )*
594+
595+
```
596+
Pelt.snap_rm("Data")
597+
```
598+
599+
It removes a file generate with these name.
600+
601+
602+
### Span_rm_all
603+
604+
This function remove all files generated with snap.
605+
606+
*Params: Pelt.snap_rm_all()*
607+
608+
```
609+
Pelt.snap_rm_all()
610+
```
611+
612+
===
613+
614+
# TANKS FOR USE PELT TESTING 💙, Do I deserve a star?

‎screenshots/snaps.PNG‎

8.94 KB
Loading

‎screenshots/take.PNG‎

5.27 KB
Loading

‎test.py‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)