Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

Problemi con i test dell' Hw4

A
Arianne.Monje (240 points)
2 4 5
in HW4 by (240 points)

Avevo caricato in precedenza numerose versioni di codice che però non superavano il test10 per il timeout, continuando a caricare nuove versioni del codice non riuscivo a passare più alcun test. Ho quindi ricaricato una versione precedente che sul mio pc riusciva ad eseguire tutti i test (senza contare il tempo) e sulla vm passava tutti i test tranne il test10, ora però lo stesso codice mi dà problemi e non riesce a passare nemmeno un test. 

test_01.py=90= in test01_example
    return self.do_test(starting_folder,destination, expected)
        destination = 'test01.out'
        expected   = {'The absorbing garbage earns retina.'= 69, 'The alluring eel hops vacuum.'= 71, 'The aware feng upgrades pollution.'= 53, 'The black moonscape disapproves ape.'= 62, ...}
        self       = 
        starting_folder = 'test01'
test_01.py=38= in do_test
    self.assertDictEqual(expected, result)
E   AssertionError= {'The[363 chars]'The daily dinner misspells imagination.'= 59,[325 chars]= 45} != {'The[363 chars]'The pointless land licks dirt.'= 57, 'The fer[324 chars]'= 0}
E   Diff is 946 characters long. Set self.maxDiff to None to see it.
        destination = 'test01.out'
        expected   = {'The absorbing garbage earns retina.'= 69, 'The alluring eel hops vacuum.'= 71, 'The aware feng upgrades pollution.'= 53, 'The black moonscape disapproves ape.'= 62, ...}
        program    = 
        result     = {'The absorbing garbage earns retina.'= 69, 'The alluring eel hops vacuum.'= 71, 'The aware feng upgrades pollution.'= 53, 'The black moonscape disapproves ape.'= 62, ...}
        self       = 
        starting_folder = 'test01'
Come detto, se eseguo il codice dal mio pc, funziona tutto senza problemi, ma qui mi dà questo errore
319 views

2 Answers

daniel ionut virlan (2490 points)
1 6 15
by (2.5k points)
ho il tuo stesso problema , oggi ho caricato un paio di versioni , passavo 13 test normali su 14 ,  tranne il test10 per timeout , attualmente da circa 1 ora passo solo 4 test , che sono quelli standard....., sul mio pc in locale passo tutti i test tranne 1 come accadeva prima su vm . ho il tuo stesso output di errore su vm
daniel ionut virlan (2490 points)
1 6 15
by (2.5k points)
sembra essere rotta la vm
a
andreacapitanelli (690 points)
2 11 16
by (690 points)
anche io ho lo stesso problema
g
greensimo (1630 points)
0 0 7
by (1.6k points)
stesso errore anche io. In locale passo tutti i test
g
giacomo.dellomo (250 points)
0 2 3
by (250 points)
Stesso problema,  credo sia un errore generico sulla vpn
L
LucaB (300 points)
1 2 3
by (300 points)
stesso identico problema ...
andrea.sterbini (208020 points)
756 1270 2377
by (208k points)
Domattina controllo
g
greensimo (1630 points)
0 0 7
by (1.6k points)
I test appena ripetuti sulla sottomisione adesso risultano PASSED e non più FAILED.
andrea.sterbini (208020 points)
756 1270 2377
by (208k points)
Sì, ho sistemato una cosa ieri sera
A
Arianne.Monje (240 points)
2 4 5
by (240 points)

A me invece dà questo errore ora per tutti i test

_____________________________ Test.test01_example ______________________________
test_01.py=90= in test01_example
    return self.do_test(starting_folder,destination, expected)
        destination = 'test01.out'
        expected   = {'The absorbing garbage earns retina.'= 69, 'The alluring eel hops vacuum.'= 71, 'The aware feng upgrades pollution.'= 53, 'The black moonscape disapproves ape.'= 62, ...}
        self       = 
        starting_folder = 'test01'
test_01.py=40= in do_test
    self.check_song_files(starting_folder, destination)
        destination = 'test01.out'
        expected   = {'The absorbing garbage earns retina.'= 69, 'The alluring eel hops vacuum.'= 71, 'The aware feng upgrades pollution.'= 53, 'The black moonscape disapproves ape.'= 62, ...}
        program    = 
        result     = {'The absorbing garbage earns retina.'= 69, 'The alluring eel hops vacuum.'= 71, 'The aware feng upgrades pollution.'= 53, 'The black moonscape disapproves ape.'= 62, ...}
        self       = 
        starting_folder = 'test01'
test_01.py=158= in check_song_files
    self.check_text_file(starting_file, ending_file)
        F          = <_io.TextIOWrapper name='test01/index.txt' mode='r' encoding='utf-8'>
        destination = 'test01.out'
        ending_file = 'test01.out/The daily dinner misspells imagination..txt'
        files      = ['"The daily dinner misspells imagination." "17.txt"\n', '"The victorious vernacular curves ride." "16.txt"\n', '"The ..."14.txt"\n', '"The concerned baggy memorizes mistake." "13.txt"\n', '"The fancy airforce traces map." "12.txt"\n', ...]
        item       = '"The daily dinner misspells imagination." "17.txt"\n'
        self       = 
        starting_file = 'test01.expected/The daily dinner misspells imagination..txt'
        starting_folder = 'test01'
        tokens     = ['"The daily dinner misspells imagination.', '17.txt"\n']
testlib.py=230= in check_text_file
    with open(b, encoding='utf8') as f= txt_b = f.read()
E   FileNotFoundError= [Errno 2] No such file or directory= 'test01.out/The daily dinner misspells imagination..txt'
        a          = 'test01.expected/The daily dinner misspells imagination..txt'
        b          = 'test01.out/The daily dinner misspells imagination..txt'
        f          = <_io.TextIOWrapper name='test01.expected/The daily dinner misspells imagination..txt' mode='r' encoding='utf8'>
        self       = 
        txt_a      = 'D1P1G#1P1A1P1F#1B1P1E#1P1G#1P1C1P1Cb1P1Cb1B1B#1B1Gb1Cb1D1A1P1E1P1A#1D#1P1F1P1A1P1C1P1C1P1Ab1Gb1C#1A1G#1F1P1F1P1B#1P1F1P1D#1Bb1P1A1D1B#1P1\n'
L'out e l'expected mi sembrano uguali e se eseguo il codice dal mio pc non mi dà errori, mi crea file e cartelle senza problemi; non capisco cosa non vada